public class AtomixLeaderElector extends io.atomix.resource.AbstractResource<AtomixLeaderElector> implements org.onosproject.store.service.AsyncLeaderElector
AsyncLeaderElector primitive.| Modifier and Type | Field and Description |
|---|---|
static String |
CHANGE_SUBJECT |
| Constructor and Description |
|---|
AtomixLeaderElector(io.atomix.copycat.client.CopycatClient client,
Properties properties) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
addChangeListener(Consumer<org.onosproject.event.Change<org.onosproject.cluster.Leadership>> consumer) |
void |
addStatusChangeListener(Consumer<org.onosproject.store.service.DistributedPrimitive.Status> listener) |
CompletableFuture<Boolean> |
anoint(String topic,
org.onosproject.cluster.NodeId nodeId) |
CompletableFuture<Void> |
destroy() |
CompletableFuture<Void> |
evict(org.onosproject.cluster.NodeId nodeId) |
CompletableFuture<Set<String>> |
getElectedTopics(org.onosproject.cluster.NodeId nodeId) |
CompletableFuture<org.onosproject.cluster.Leadership> |
getLeadership(String topic) |
CompletableFuture<Map<String,org.onosproject.cluster.Leadership>> |
getLeaderships() |
String |
name() |
CompletableFuture<AtomixLeaderElector> |
open() |
CompletableFuture<Boolean> |
promote(String topic,
org.onosproject.cluster.NodeId nodeId) |
CompletableFuture<Void> |
removeChangeListener(Consumer<org.onosproject.event.Change<org.onosproject.cluster.Leadership>> consumer) |
void |
removeStatusChangeListener(Consumer<org.onosproject.store.service.DistributedPrimitive.Status> listener) |
CompletableFuture<org.onosproject.cluster.Leadership> |
run(String topic,
org.onosproject.cluster.NodeId nodeId) |
CompletableFuture<AtomixLeaderElector> |
setupCache() |
Collection<Consumer<org.onosproject.store.service.DistributedPrimitive.Status>> |
statusChangeListeners() |
CompletableFuture<Void> |
withdraw(String topic) |
close, config, context, delete, equals, hashCode, isClosed, isOpen, onStateChange, options, serializer, state, toString, typeclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final String CHANGE_SUBJECT
public AtomixLeaderElector(io.atomix.copycat.client.CopycatClient client,
Properties properties)
public CompletableFuture<Void> destroy()
destroy in interface org.onosproject.store.service.DistributedPrimitivepublic String name()
name in interface org.onosproject.store.service.DistributedPrimitivepublic CompletableFuture<AtomixLeaderElector> open()
open in interface io.atomix.catalyst.util.Managed<AtomixLeaderElector>open in interface io.atomix.resource.Resource<AtomixLeaderElector>open in class io.atomix.resource.AbstractResource<AtomixLeaderElector>public CompletableFuture<AtomixLeaderElector> setupCache()
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<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<Set<String>> getElectedTopics(org.onosproject.cluster.NodeId nodeId)
public CompletableFuture<Void> addChangeListener(Consumer<org.onosproject.event.Change<org.onosproject.cluster.Leadership>> consumer)
addChangeListener in interface org.onosproject.store.service.AsyncLeaderElectorpublic CompletableFuture<Void> removeChangeListener(Consumer<org.onosproject.event.Change<org.onosproject.cluster.Leadership>> consumer)
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.