public class

ClusterConfig

extends Object
java.lang.Object
   ↳ org.apache.helix.api.config.ClusterConfig

Class Overview

Configuration properties of a cluster

Summary

Nested Classes
class ClusterConfig.Builder Assembles a cluster configuration  
class ClusterConfig.Delta Update context for a ClusterConfig  
Public Methods
boolean autoJoinAllowed()
Check if this cluster allows participants to join automatically
Alerts getAlerts()
Get all the alerts persisted on the cluster
Map<ClusterConstraints.ConstraintTypeClusterConstraints> getConstraintMap()
Get all the constraints on the cluster
ClusterId getId()
Get cluster id
Map<ParticipantIdParticipantConfig> getParticipantMap()
Get participants of the cluster
Map<ResourceIdResourceConfig> getResourceMap()
Get resources in the cluster
Map<StateModelDefIdStateModelDefinition> getStateModelMap()
Get all the state model definitions on the cluster
String getStateUpperBoundConstraint(Scope<?> scope, StateModelDefId stateModelDefId, State state)
Get the maximum number of participants that can be in a state
PersistentStats getStats()
Get all the statistics persisted on the cluster
int getTransitionConstraint(Scope<?> scope, StateModelDefId stateModelDefId, Transition transition)
Get the limit of simultaneous execution of a transition
UserConfig getUserConfig()
Get user-specified configuration properties of this cluster
boolean isPaused()
Check the paused status of the cluster
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public boolean autoJoinAllowed ()

Check if this cluster allows participants to join automatically

Returns
  • true if allowed, false if disallowed

public Alerts getAlerts ()

Get all the alerts persisted on the cluster

Returns
  • Alerts instance

public Map<ClusterConstraints.ConstraintTypeClusterConstraints> getConstraintMap ()

Get all the constraints on the cluster

Returns
  • map of constraint type to constraints

public ClusterId getId ()

Get cluster id

Returns
  • cluster id

public Map<ParticipantIdParticipantConfig> getParticipantMap ()

Get participants of the cluster

Returns
  • a map of participant id to participant, or empty map if none

public Map<ResourceIdResourceConfig> getResourceMap ()

Get resources in the cluster

Returns
  • a map of resource id to resource, or empty map if none

public Map<StateModelDefIdStateModelDefinition> getStateModelMap ()

Get all the state model definitions on the cluster

Returns
  • map of state model definition id to state model definition

public String getStateUpperBoundConstraint (Scope<?> scope, StateModelDefId stateModelDefId, State state)

Get the maximum number of participants that can be in a state

Parameters
scope the scope for the bound
stateModelDefId the state model of the state
state the constrained state
Returns
  • The upper bound, which can be "-1" if unspecified, a numerical upper bound, "R" for number of replicas, or "N" for number of participants

public PersistentStats getStats ()

Get all the statistics persisted on the cluster

Returns
  • PersistentStats instance

public int getTransitionConstraint (Scope<?> scope, StateModelDefId stateModelDefId, Transition transition)

Get the limit of simultaneous execution of a transition

Parameters
scope the scope under which the transition is constrained
stateModelDefId the state model of which the transition is a part
transition the constrained transition
Returns
  • the limit, or Integer.MAX_VALUE if there is no limit

public UserConfig getUserConfig ()

Get user-specified configuration properties of this cluster

Returns
  • UserConfig properties

public boolean isPaused ()

Check the paused status of the cluster

Returns
  • true if paused, false otherwise