Class ClusterLeaderServiceLocalLeaderImpl

java.lang.Object
com.netflix.genie.web.services.impl.ClusterLeaderServiceLocalLeaderImpl
All Implemented Interfaces:
ClusterLeaderService

public class ClusterLeaderServiceLocalLeaderImpl extends Object implements ClusterLeaderService
Implementation of ClusterLeaderService using statically configured LocalLeader module.
Since:
4.0.0
  • Constructor Details

    • ClusterLeaderServiceLocalLeaderImpl

      public ClusterLeaderServiceLocalLeaderImpl(LocalLeader localLeader)
      Constructor.
      Parameters:
      localLeader - the local leader module
  • Method Details

    • 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