public class FailoverElector
extends org.apache.curator.framework.recipes.leader.LeaderSelectorListenerAdapter
FailoverElector it registers itself with the leadership election and controls the lifecycle of
TaskFailover if elected| Constructor and Description |
|---|
FailoverElector(EngineID identifier,
ZookeeperConnection zookeeper,
TaskStateStorage storage)
Instantiating a
FailoverElector adds this engine to the leadership selection process |
| Modifier and Type | Method and Description |
|---|---|
EngineID |
awaitLeader()
Return the identifier of the current leader.
|
void |
renounce() |
void |
takeLeadership(org.apache.curator.framework.CuratorFramework client)
Called when this instance of TaskFailover is elected as leader and starts listening for
failed engines.
|
public FailoverElector(EngineID identifier, ZookeeperConnection zookeeper, TaskStateStorage storage)
FailoverElector adds this engine to the leadership selection processpublic void renounce()
public EngineID awaitLeader()
Copyright © 2017 Grakn Labs Ltd. All rights reserved.