Interface LeaderElection

    • Method Detail

      • confirmLeadership

        void confirmLeadership​(UUID leaderSessionID,
                               String leaderAddress)
        Confirms that the LeaderContender has accepted the leadership identified by the given leader session id. It also publishes the leader address under which the leader is reachable.

        The intention of this method is to establish an order between setting the new leader session ID in the LeaderContender and publishing the new leader session ID and the related leader address to the leader retrieval services.

        Parameters:
        leaderSessionID - The new leader session ID
        leaderAddress - The address of the new leader
      • hasLeadership

        boolean hasLeadership​(UUID leaderSessionId)
        Returns true if the service's LeaderContender has the leadership under the given leader session ID acquired.
        Parameters:
        leaderSessionId - identifying the current leader
        Returns:
        true if the associated LeaderContender is the leader, otherwise false