Interface LeaderElectionDriver

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
ZooKeeperLeaderElectionDriver

public interface LeaderElectionDriver extends AutoCloseable
A leader election driver that allows to write LeaderInformation for multiple components.
  • Method Details

    • hasLeadership

      boolean hasLeadership()
      Returns whether the driver has currently leadership.
      Returns:
      true if the driver has leadership, otherwise false
    • publishLeaderInformation

      void publishLeaderInformation(String componentId, LeaderInformation leaderInformation)
      Publishes the leader information for the given component.
      Parameters:
      componentId - identifying the component for which to publish the leader information
      leaderInformation - leader information of the respective component
    • deleteLeaderInformation

      void deleteLeaderInformation(String componentId)
      Deletes the leader information for the given component.
      Parameters:
      componentId - identifying the component for which to delete the leader information