public class PartitionedAsyncLeaderElector extends Object implements org.onosproject.store.service.AsyncLeaderElector
AsyncLeaderElector that has its topics partitioned horizontally across
several leader electors.| Constructor and Description |
|---|
PartitionedAsyncLeaderElector(String name,
Map<org.onosproject.cluster.PartitionId,org.onosproject.store.service.AsyncLeaderElector> partitions,
Hasher<String> topicHasher) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
addChangeListener(Consumer<org.onosproject.event.Change<org.onosproject.cluster.Leadership>> listener) |
void |
addStatusChangeListener(Consumer<org.onosproject.store.service.DistributedPrimitive.Status> 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() |
String |
name() |
CompletableFuture<Boolean> |
promote(String topic,
org.onosproject.cluster.NodeId nodeId) |
CompletableFuture<Void> |
removeChangeListener(Consumer<org.onosproject.event.Change<org.onosproject.cluster.Leadership>> listener) |
void |
removeStatusChangeListener(Consumer<org.onosproject.store.service.DistributedPrimitive.Status> listener) |
CompletableFuture<org.onosproject.cluster.Leadership> |
run(String topic,
org.onosproject.cluster.NodeId nodeId) |
Collection<Consumer<org.onosproject.store.service.DistributedPrimitive.Status>> |
statusChangeListeners() |
CompletableFuture<Void> |
withdraw(String topic) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic String name()
name in interface org.onosproject.store.service.DistributedPrimitivepublic 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<Boolean> promote(String topic, org.onosproject.cluster.NodeId nodeId)
promote in interface org.onosproject.store.service.AsyncLeaderElectorpublic CompletableFuture<Void> evict(org.onosproject.cluster.NodeId nodeId)
evict 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.AsyncLeaderElectorpublic void addStatusChangeListener(Consumer<org.onosproject.store.service.DistributedPrimitive.Status> listener)
addStatusChangeListener in interface org.onosproject.store.service.DistributedPrimitivepublic void removeStatusChangeListener(Consumer<org.onosproject.store.service.DistributedPrimitive.Status> listener)
removeStatusChangeListener in interface org.onosproject.store.service.DistributedPrimitivepublic Collection<Consumer<org.onosproject.store.service.DistributedPrimitive.Status>> statusChangeListeners()
statusChangeListeners in interface org.onosproject.store.service.DistributedPrimitiveCopyright © 2016. All rights reserved.