public class PersistRemoveApiStateListener extends Object implements MultiBrokerBalancerOperationProgressListener<BrokerRemovalStateMachine.BrokerRemovalState>
MultiBrokerBalancerOperationProgressListener
that
persists all state updates for a single broker removal operation to diskConstructor and Description |
---|
PersistRemoveApiStateListener(ApiStatePersistenceStore persistenceStore,
boolean shouldShutdown) |
Modifier and Type | Method and Description |
---|---|
void |
onProgressChanged(Set<Integer> brokerIds,
BrokerRemovalStateMachine.BrokerRemovalState state,
Exception e)
Called whenever the state of the balancer operation operation changes.
|
public PersistRemoveApiStateListener(ApiStatePersistenceStore persistenceStore, boolean shouldShutdown)
persistenceStore
- the data store for persisted operationsshouldShutdown
- a boolean indicating whether this removal operation has its shutdown step enabledpublic void onProgressChanged(Set<Integer> brokerIds, BrokerRemovalStateMachine.BrokerRemovalState state, Exception e)
MultiBrokerBalancerOperationProgressListener
onProgressChanged
in interface MultiBrokerBalancerOperationProgressListener<BrokerRemovalStateMachine.BrokerRemovalState>
brokerIds
- Ids of the brokers that this operation is working on.state
- the new state the operation is ine
- - nullable, an exception that occurred during the balancer operation