public interface PrimaryElection extends ListenerService<PrimaryElectionEvent,PrimaryElectionEventListener>
A primary election is used to elect a primary and backups for a single partition. To enter a primary election
for a partition, a node must call the
enter(GroupMember) method. Once an election is complete, the
PrimaryTerm can be read via
The prioritization of candidates within a primary election is unspecified.
|Modifier and Type||Method and Description|
Enters the primary election.
Returns the current term.
CompletableFuture<PrimaryTerm> enter(GroupMember member)
When entering a primary election, the provided
GroupMember will be added to the election's candidate list.
The returned term is representative of the term after the member joins the election. Thus, if the
joining member is immediately elected primary, the returned term should reflect that.
member- the member to enter the election
Copyright © 2013–2018. All rights reserved.