public static class BrokerRemovalPhaseExecutor.Builder<T>
extends java.lang.Object
Constructor and Description |
---|
Builder(BrokerRemovalStateMachine.BrokerRemovalEvent successEvent,
BrokerRemovalStateMachine.BrokerRemovalEvent failureEvent,
java.util.function.Function<java.util.Set<java.lang.Integer>,java.lang.String> errMsgSupplier) |
Builder(BrokerRemovalStateMachine.BrokerRemovalEvent successEvent,
BrokerRemovalStateMachine.BrokerRemovalEvent failureEvent,
java.util.function.Function<java.util.Set<java.lang.Integer>,java.lang.String> errMsgSupplier,
java.lang.Class<? extends java.lang.Exception> exceptionWrapper) |
Modifier and Type | Method and Description |
---|---|
BrokerRemovalPhaseExecutor<T> |
build(BrokerRemovalCallback progressCallback,
BrokerRemovalOptions removalArgs) |
public Builder(BrokerRemovalStateMachine.BrokerRemovalEvent successEvent, BrokerRemovalStateMachine.BrokerRemovalEvent failureEvent, java.util.function.Function<java.util.Set<java.lang.Integer>,java.lang.String> errMsgSupplier)
public Builder(BrokerRemovalStateMachine.BrokerRemovalEvent successEvent, BrokerRemovalStateMachine.BrokerRemovalEvent failureEvent, java.util.function.Function<java.util.Set<java.lang.Integer>,java.lang.String> errMsgSupplier, java.lang.Class<? extends java.lang.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, BrokerRemovalOptions removalArgs)