Interface LeaderElectionDriver.Listener

All Known Implementing Classes:
DefaultLeaderElectionService
Enclosing interface:
LeaderElectionDriver

public static interface LeaderElectionDriver.Listener
Listener interface for state changes of the LeaderElectionDriver.
  • Method Details

    • onGrantLeadership

      void onGrantLeadership(UUID leaderSessionID)
      Callback that is called once the driver obtains the leadership.
    • onRevokeLeadership

      void onRevokeLeadership()
      Callback that is called once the driver loses the leadership.
    • onLeaderInformationChange

      void onLeaderInformationChange(String componentId, LeaderInformation leaderInformation)
      Notifies the listener about a changed leader information for the given component.
      Parameters:
      componentId - identifying the component whose leader information has changed
      leaderInformation - new leader information
    • onLeaderInformationChange

      void onLeaderInformationChange(LeaderInformationRegister leaderInformationRegister)
      Notifies the listener about all currently known leader information.
    • onError

      void onError(Throwable t)
      Notifies the listener if an error occurred.