public class MultiBrokerAdditionOperation extends Object implements BalancerOperationCallback<BrokerAdditionStateMachine.BrokerAdditionState,BrokerAdditionStateMachine.BrokerAdditionEvent>
BrokerAdditionStateMachine.BrokerAdditionEvent
occurs as part of adding the broker. It propagates the event to the multiple #BrokerAdditionStateManager
s, each of which accounts for a single broker.
The state machine is described thoroughly in #BrokerAdditionStateMachine
.Constructor and Description |
---|
MultiBrokerAdditionOperation(Set<Integer> brokerIds,
List<BrokerAdditionStateManager> stateManagers) |
Modifier and Type | Method and Description |
---|---|
Set<Integer> |
brokerIds() |
BrokerAdditionStateMachine.BrokerAdditionState |
currentState()
Returns the current state of the broker addition operation.
|
void |
registerEvent(BrokerAdditionStateMachine.BrokerAdditionEvent event)
Registers a new #
BalancerOperationEvent as part of the progress changing |
void |
registerEvent(BrokerAdditionStateMachine.BrokerAdditionEvent event,
Exception e)
Registers a new errorful #
BalancerOperationEvent as part of the progress changing |
String |
toString() |
public MultiBrokerAdditionOperation(Set<Integer> brokerIds, List<BrokerAdditionStateManager> stateManagers)
public BrokerAdditionStateMachine.BrokerAdditionState currentState()
currentState
in interface BalancerOperationCallback<BrokerAdditionStateMachine.BrokerAdditionState,BrokerAdditionStateMachine.BrokerAdditionEvent>
IllegalStateException
- - in case the broker additions are in differing statespublic void registerEvent(BrokerAdditionStateMachine.BrokerAdditionEvent event)
BalancerOperationCallback
BalancerOperationEvent
as part of the progress changingpublic void registerEvent(BrokerAdditionStateMachine.BrokerAdditionEvent event, Exception e)
BalancerOperationCallback
BalancerOperationEvent
as part of the progress changing