public static class BrokerRemovalPhaseExecutor.Builder<T> extends Object
Constructor and Description |
---|
Builder(BrokerRemovalStateMachine.BrokerRemovalEvent successEvent,
BrokerRemovalStateMachine.BrokerRemovalEvent failureEvent,
Function<Set<Integer>,String> errMsgSupplier) |
Builder(BrokerRemovalStateMachine.BrokerRemovalEvent successEvent,
BrokerRemovalStateMachine.BrokerRemovalEvent failureEvent,
Function<Set<Integer>,String> errMsgSupplier,
Class<? extends Exception> exceptionWrapper) |
Modifier and Type | Method and Description |
---|---|
BrokerRemovalPhaseExecutor<T> |
build(BrokerRemovalCallback progressCallback,
BrokerRemovalContext removalArgs) |
public Builder(BrokerRemovalStateMachine.BrokerRemovalEvent successEvent, BrokerRemovalStateMachine.BrokerRemovalEvent failureEvent, Function<Set<Integer>,String> errMsgSupplier)
public Builder(BrokerRemovalStateMachine.BrokerRemovalEvent successEvent, BrokerRemovalStateMachine.BrokerRemovalEvent failureEvent, Function<Set<Integer>,String> errMsgSupplier, Class<? extends Exception> exceptionWrapper)
successEvent
- - nullable, the broker removal event that gets registered on successful phase completionfailureEvent
- - the broker removal event that gets registered on an exceptional phase completionerrMsgSupplier
- - a function that accepts a #Set
of brokerIds as an argument
and returns a descriptive error message explaining what phase failedexceptionWrapper
- - a nullable (optional) class to wrap any thrown exception aspublic BrokerRemovalPhaseExecutor<T> build(BrokerRemovalCallback progressCallback, BrokerRemovalContext removalArgs)