Package com.netflix.genie.web.services
Interface ClusterLeaderService
-
- All Known Implementing Classes:
ClusterLeaderServiceCuratorImpl,ClusterLeaderServiceLocalLeaderImpl
public interface ClusterLeaderServiceService interface for the abstracts the details of leadership within nodes in a Genie cluster.- Since:
- 4.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisLeader()Whether or not this node is the current cluster leader.booleanisRunning()Whether or not this node is participating in the cluster leader election.voidstart()Start the service (i.e.voidstop()Stop the service (i.e.
-
-
-
Method Detail
-
stop
void stop()
Stop the service (i.e. renounce leadership and leave the election).
-
start
void start()
Start the service (i.e. join the the election).
-
isRunning
boolean isRunning()
Whether or not this node is participating in the cluster leader election.- Returns:
- true if the node is participating in leader election
-
isLeader
boolean isLeader()
Whether or not this node is the current cluster leader.- Returns:
- true if the node is the current cluster leader
-
-