| Package | Description |
|---|---|
| io.atomix.core.election |
Distributed leader election primitives.
|
| Modifier and Type | Method and Description |
|---|---|
Leadership<T> |
LeaderElection.getLeadership()
Returns the
Leadership for the specified topic. |
Leadership<T> |
LeaderElector.getLeadership(String topic)
Returns the
Leadership for the specified topic. |
<U> Leadership<U> |
Leadership.map(Function<T,U> mapper)
Maps the leadership identifiers using the given mapper.
|
Leadership<T> |
LeadershipEvent.newLeadership()
Returns the new leadership for the topic.
|
Leadership<T> |
LeadershipEvent.oldLeadership()
Returns the prior leadership for the topic.
|
Leadership<T> |
LeaderElector.run(String topic,
T identifier)
Attempts to become leader for a topic.
|
Leadership<T> |
LeaderElection.run(T identifier)
Attempts to become leader for a topic.
|
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Leadership<T>> |
AsyncLeaderElection.getLeadership()
Returns the
Leadership for the specified topic. |
CompletableFuture<Leadership<T>> |
AsyncLeaderElector.getLeadership(String topic)
Returns the
Leadership for the specified topic. |
CompletableFuture<Map<String,Leadership<T>>> |
AsyncLeaderElector.getLeaderships()
Returns the current
Leaderships for all topics. |
Map<String,Leadership<T>> |
LeaderElector.getLeaderships()
Returns the current
Leaderships for all topics. |
CompletableFuture<Leadership<T>> |
AsyncLeaderElector.run(String topic,
T identifier)
Attempts to become leader for a topic.
|
CompletableFuture<Leadership<T>> |
AsyncLeaderElection.run(T identifier)
Attempts to become leader for a topic.
|
| Constructor and Description |
|---|
LeadershipEvent(LeadershipEvent.Type type,
String topic,
Leadership<T> oldLeadership,
Leadership<T> newLeadership)
Creates an event of a given type and for the specified instance and the
current time.
|
LeadershipEvent(LeadershipEvent.Type type,
String topic,
Leadership<T> oldLeadership,
Leadership<T> newLeadership)
Creates an event of a given type and for the specified instance and the
current time.
|
LeadershipEvent(LeadershipEvent.Type type,
String topic,
Leadership<T> oldLeadership,
Leadership<T> newLeadership,
long time)
Creates an event of a given type and for the specified subject and time.
|
LeadershipEvent(LeadershipEvent.Type type,
String topic,
Leadership<T> oldLeadership,
Leadership<T> newLeadership,
long time)
Creates an event of a given type and for the specified subject and time.
|
Copyright © 2013–2018. All rights reserved.