Class StateChangeListeners
java.lang.Object
org.apache.pulsar.broker.loadbalance.extensions.channel.StateChangeListeners
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(StateChangeListener listener) voidclose()voidnotify(String serviceUnit, ServiceUnitStateData data, Throwable t) <T> CompletableFuture<T>notifyOnCompletion(CompletableFuture<T> future, String serviceUnit, ServiceUnitStateData data) Notify all currently added listeners on completion of the future.
-
Constructor Details
-
StateChangeListeners
public StateChangeListeners()
-
-
Method Details
-
addListener
-
close
public void close() -
notifyOnCompletion
public <T> CompletableFuture<T> notifyOnCompletion(CompletableFuture<T> future, String serviceUnit, ServiceUnitStateData data) Notify all currently added listeners on completion of the future.- Returns:
- future of a new completion stage
-
notify
-