@Endpoint(id="leaderElection")
public class LeaderElectionActuator
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LeaderElectionActuator.Action
Operations that this actuator can perform on the leader service.
|
| Constructor and Description |
|---|
LeaderElectionActuator(ClusterLeaderService clusterLeaderService)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doAction(LeaderElectionActuator.Action action)
Forces the node to leave the leader election, then re-join it.
|
java.util.Map<java.lang.String,java.lang.Object> |
getStatus()
Provides the current leader service status: whether the leader service is running and whether the node is leader.
|
public LeaderElectionActuator(ClusterLeaderService clusterLeaderService)
clusterLeaderService - the cluster leader service@ReadOperation public java.util.Map<java.lang.String,java.lang.Object> getStatus()
@WriteOperation public void doAction(LeaderElectionActuator.Action action)
action - the action to perform