Interface LeaderSelectorListener

  • All Superinterfaces:
    org.apache.curator.framework.state.ConnectionStateListener
    All Known Implementing Classes:
    LeaderSelectorListenerAdapter

    public interface LeaderSelectorListener
    extends org.apache.curator.framework.state.ConnectionStateListener
    Notification for leadership
    See Also:
    LeaderSelector
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void takeLeadership​(org.apache.curator.framework.CuratorFramework client)
      Called when your instance has been granted leadership.
      • Methods inherited from interface org.apache.curator.framework.state.ConnectionStateListener

        doNotDecorate, stateChanged
    • Method Detail

      • takeLeadership

        void takeLeadership​(org.apache.curator.framework.CuratorFramework client)
                     throws java.lang.Exception
        Called when your instance has been granted leadership. This method should not return until you wish to release leadership
        Parameters:
        client - the client
        Throws:
        java.lang.Exception - any errors