Class ClusterLeaderServiceCuratorImpl

    • Constructor Summary

      Constructors 
      Constructor Description
      ClusterLeaderServiceCuratorImpl​(org.springframework.integration.zookeeper.leader.LeaderInitiator leaderInitiator)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isLeader()
      Whether or not this node is the current cluster leader.
      boolean isRunning()
      Whether or not this node is participating in the cluster leader election.
      void start()
      Start the service (i.e.
      void stop()
      Stop the service (i.e.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ClusterLeaderServiceCuratorImpl

        public ClusterLeaderServiceCuratorImpl​(org.springframework.integration.zookeeper.leader.LeaderInitiator leaderInitiator)
        Constructor.
        Parameters:
        leaderInitiator - the leader initiator component
    • Method Detail

      • stop

        public void stop()
        Stop the service (i.e. renounce leadership and leave the election).
        Specified by:
        stop in interface ClusterLeaderService
      • start

        public void start()
        Start the service (i.e. join the the election).
        Specified by:
        start in interface ClusterLeaderService
      • isRunning

        public boolean isRunning()
        Whether or not this node is participating in the cluster leader election.
        Specified by:
        isRunning in interface ClusterLeaderService
        Returns:
        true if the node is participating in leader election
      • isLeader

        public boolean isLeader()
        Whether or not this node is the current cluster leader.
        Specified by:
        isLeader in interface ClusterLeaderService
        Returns:
        true if the node is the current cluster leader