public class

StateConstraintItemBuilder

extends Object
java.lang.Object
   ↳ org.apache.helix.model.builder.StateConstraintItemBuilder

Class Overview

Build a ConstraintItem corresponding to a state bound

Summary

Public Constructors
StateConstraintItemBuilder()
Instantiate the builder
Public Methods
ConstraintItem build()
Get the ConstraintItem instance that is built
StateConstraintItemBuilder dynamicUpperBound(String dynamicUpperBound)
Set an upper bound for the replicas that can be in a state.
StateConstraintItemBuilder state(State state)
Get the state to constrain
StateConstraintItemBuilder stateModel(StateModelDefId stateModelDefId)
Get the state model definition to constrain
StateConstraintItemBuilder upperBound(int upperBound)
Set a numerical upper bound for the replicas that can be in a state
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public StateConstraintItemBuilder ()

Instantiate the builder

Public Methods

public ConstraintItem build ()

Get the ConstraintItem instance that is built

Returns
  • ConstraintItem

public StateConstraintItemBuilder dynamicUpperBound (String dynamicUpperBound)

Set an upper bound for the replicas that can be in a state. This can be numerical, or "N" for number of nodes, or "R" for total number of replicas per partition

Parameters
dynamicUpperBound maximum replica count for a state, per partition, can also be "N" or "R"
Returns
  • StateConstraintItemBuilder

public StateConstraintItemBuilder state (State state)

Get the state to constrain

Parameters
state state object
Returns
  • StateConstraintItemBuilder

public StateConstraintItemBuilder stateModel (StateModelDefId stateModelDefId)

Get the state model definition to constrain

Parameters
stateModelDefId state model definition identifier
Returns
  • StateConstraintItemBuilder

public StateConstraintItemBuilder upperBound (int upperBound)

Set a numerical upper bound for the replicas that can be in a state

Parameters
upperBound maximum replica count for a state, per partition
Returns
  • StateConstraintItemBuilder