public class ClusterLeaderServiceLocalLeaderImpl extends java.lang.Object implements ClusterLeaderService
ClusterLeaderService
using statically configured LocalLeader
module.Constructor and Description |
---|
ClusterLeaderServiceLocalLeaderImpl(LocalLeader localLeader)
Constructor.
|
Modifier and Type | Method and 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.
|
public ClusterLeaderServiceLocalLeaderImpl(LocalLeader localLeader)
localLeader
- the local leader modulepublic void stop()
stop
in interface ClusterLeaderService
public void start()
start
in interface ClusterLeaderService
public boolean isRunning()
isRunning
in interface ClusterLeaderService
public boolean isLeader()
isLeader
in interface ClusterLeaderService