Interface PrimaryElectionService

All Superinterfaces:
io.atomix.utils.event.ListenerService<PrimaryElectionEvent,​PrimaryElectionEventListener>
All Known Subinterfaces:
ManagedPrimaryElectionService

public interface PrimaryElectionService
extends io.atomix.utils.event.ListenerService<PrimaryElectionEvent,​PrimaryElectionEventListener>
Partition primary election service.

The primary election service is used to elect primaries and backups for primary-backup replication protocols. Each partition is provided a distinct PrimaryElection through which it elects a primary.

  • Method Summary

    Modifier and Type Method Description
    PrimaryElection getElectionFor​(PartitionId partitionId)
    Returns the primary election for the given partition identifier.

    Methods inherited from interface io.atomix.utils.event.ListenerService

    addListener, removeListener
  • Method Details

    • getElectionFor

      PrimaryElection getElectionFor​(PartitionId partitionId)
      Returns the primary election for the given partition identifier.
      Parameters:
      partitionId - the partition identifier for which to return the primary election
      Returns:
      the primary election for the given partition identifier