public class

ClusterConfiguration

extends HelixProperty
java.lang.Object
   ↳ org.apache.helix.HelixProperty
     ↳ org.apache.helix.model.ClusterConfiguration

Class Overview

Persisted configuration properties for a cluster

Summary

[Expand]
Inherited Fields
From class org.apache.helix.HelixProperty
Public Constructors
ClusterConfiguration(ClusterId id)
Instantiate for an id
ClusterConfiguration(ZNRecord record)
Instantiate from a record
Public Methods
boolean autoJoinAllowed()
Determine if participants can automatically join the cluster
static ClusterConfiguration from(ClusterId clusterId, UserConfig userConfig)
Create a new ClusterConfiguration from a UserConfig
ClusterId getClusterId()
Get a typed cluster id
Map<StringMap<StringString>> getIdealStateRules()
Get the rules, if any, that all ideal states in this cluster must follow
UserConfig getUserConfig()
Get a backward-compatible cluster user config
void setAutoJoinAllowed(boolean autoJoinAllowed)
Set if participants can automatically join the cluster
[Expand]
Inherited Methods
From class org.apache.helix.HelixProperty
From class java.lang.Object

Public Constructors

public ClusterConfiguration (ClusterId id)

Instantiate for an id

Parameters
id cluster id

public ClusterConfiguration (ZNRecord record)

Instantiate from a record

Parameters
record configuration properties

Public Methods

public boolean autoJoinAllowed ()

Determine if participants can automatically join the cluster

Returns
  • true if allowed, false if disallowed

public static ClusterConfiguration from (ClusterId clusterId, UserConfig userConfig)

Create a new ClusterConfiguration from a UserConfig

Parameters
userConfig user-defined configuration properties
Returns
  • ClusterConfiguration

public ClusterId getClusterId ()

Get a typed cluster id

Returns
  • ClusterId

public Map<StringMap<StringString>> getIdealStateRules ()

Get the rules, if any, that all ideal states in this cluster must follow

Returns
  • map of rule name to key-value requirements in the ideal state

public UserConfig getUserConfig ()

Get a backward-compatible cluster user config

Returns
  • UserConfig

public void setAutoJoinAllowed (boolean autoJoinAllowed)

Set if participants can automatically join the cluster

Parameters
autoJoinAllowed true if allowed, false if disallowed