public class ExecutingAsyncLeaderElector extends ExecutingDistributedPrimitive implements org.onosproject.store.service.AsyncLeaderElector
AsyncLeaderElector that executes asynchronous callbacks on a user provided
Executor.| Constructor and Description |
|---|
ExecutingAsyncLeaderElector(org.onosproject.store.service.AsyncLeaderElector delegateElector,
Executor executor) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
addChangeListener(Consumer<org.onosproject.event.Change<org.onosproject.cluster.Leadership>> listener) |
CompletableFuture<Boolean> |
anoint(String topic,
org.onosproject.cluster.NodeId nodeId) |
CompletableFuture<Void> |
evict(org.onosproject.cluster.NodeId nodeId) |
CompletableFuture<org.onosproject.cluster.Leadership> |
getLeadership(String topic) |
CompletableFuture<Map<String,org.onosproject.cluster.Leadership>> |
getLeaderships() |
CompletableFuture<Boolean> |
promote(String topic,
org.onosproject.cluster.NodeId nodeId) |
CompletableFuture<Void> |
removeChangeListener(Consumer<org.onosproject.event.Change<org.onosproject.cluster.Leadership>> listener) |
CompletableFuture<org.onosproject.cluster.Leadership> |
run(String topic,
org.onosproject.cluster.NodeId nodeId) |
CompletableFuture<Void> |
withdraw(String topic) |
addStatusChangeListener, destroy, removeStatusChangeListenerapplicationId, equals, hashCode, name, primitiveType, statusChangeListeners, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic ExecutingAsyncLeaderElector(org.onosproject.store.service.AsyncLeaderElector delegateElector,
Executor executor)
public CompletableFuture<org.onosproject.cluster.Leadership> run(String topic, org.onosproject.cluster.NodeId nodeId)
run in interface org.onosproject.store.service.AsyncLeaderElectorpublic CompletableFuture<Void> withdraw(String topic)
withdraw in interface org.onosproject.store.service.AsyncLeaderElectorpublic CompletableFuture<Boolean> anoint(String topic, org.onosproject.cluster.NodeId nodeId)
anoint in interface org.onosproject.store.service.AsyncLeaderElectorpublic CompletableFuture<Void> evict(org.onosproject.cluster.NodeId nodeId)
evict in interface org.onosproject.store.service.AsyncLeaderElectorpublic CompletableFuture<Boolean> promote(String topic, org.onosproject.cluster.NodeId nodeId)
promote in interface org.onosproject.store.service.AsyncLeaderElectorpublic CompletableFuture<org.onosproject.cluster.Leadership> getLeadership(String topic)
getLeadership in interface org.onosproject.store.service.AsyncLeaderElectorpublic CompletableFuture<Map<String,org.onosproject.cluster.Leadership>> getLeaderships()
getLeaderships in interface org.onosproject.store.service.AsyncLeaderElectorpublic CompletableFuture<Void> addChangeListener(Consumer<org.onosproject.event.Change<org.onosproject.cluster.Leadership>> listener)
addChangeListener in interface org.onosproject.store.service.AsyncLeaderElectorpublic CompletableFuture<Void> removeChangeListener(Consumer<org.onosproject.event.Change<org.onosproject.cluster.Leadership>> listener)
removeChangeListener in interface org.onosproject.store.service.AsyncLeaderElector