public class GroupFailoverClusterPaths extends FailoverClusterPaths
GroupFailoverStrategy
.clusterPaths, failoverZNodePath, failoverZNodeRoot, strategiesZNodePath, strategiesZNodeRoot, strategyZNodePath, strategyZNodeRoot
Constructor and Description |
---|
GroupFailoverClusterPaths(String groupName) |
Modifier and Type | Method and Description |
---|---|
protected void |
clearAllClusterPaths(org.apache.curator.framework.CuratorFramework client)
Clears all cluster paths
|
protected void |
createAllClusterPaths(org.apache.curator.framework.CuratorFramework client)
Creates all cluster paths
|
void |
createAllEphemeralNodes(org.apache.curator.framework.CuratorFramework client)
This method will be called whenever a connection reconnection happens.
|
void |
createPathStructure(org.apache.curator.framework.CuratorFramework client,
Set<String> groupNames)
Creates the path structure, {active, actingAs, registered} ZNode paths under each group name
|
String |
getActingAsNodesZNodePath(String groupName) |
String |
getActingAsNodesZNodePath(String groupName,
String nodeName) |
String |
getActiveNodesZNodePath(String groupName) |
String |
getClusterLockZNodePathSuffix(String nodeName)
Get the path, on which a cluster lock to be taken whenever a distributed lock has to be acquired to start failover.
|
String |
getGroupName() |
String |
getGroupZNodePath(String groupName)
ZNode path to a given group.
|
String |
getMyNodeActiveEphemeralZNodePath() |
String |
getRegisteredNodesZNodePath(String groupName) |
String |
getStrategyName()
Get the name of the strategy to which this cluster path pattern is binded to
|
protected void |
initializeClusterPaths()
Initializes the cluster paths
|
clearAll, createAll, getClusterPaths, getFailoverZNodePath, getFailoverZNodeRoot, getStrategiesZNodePath, getStrategiesZNodeRoot, getStrategyZNodePath, getStrategyZNodeRoot, initialize
public GroupFailoverClusterPaths(String groupName)
protected void initializeClusterPaths()
FailoverClusterPaths
initializeClusterPaths
in class FailoverClusterPaths
FailoverClusterPaths.initialize(ClusterPaths)
protected void createAllClusterPaths(org.apache.curator.framework.CuratorFramework client)
FailoverClusterPaths
createAllClusterPaths
in class FailoverClusterPaths
client
- the curator framework to be used for creationFailoverClusterPaths.createAll(CuratorFramework)
protected void clearAllClusterPaths(org.apache.curator.framework.CuratorFramework client)
FailoverClusterPaths
clearAllClusterPaths
in class FailoverClusterPaths
client
- the curator framework to be used for clearingFailoverClusterPaths.clearAll(CuratorFramework)
public void createAllEphemeralNodes(org.apache.curator.framework.CuratorFramework client)
FailoverClusterPaths
createAllEphemeralNodes
in class FailoverClusterPaths
client
- CuratorFramework
instancepublic void createPathStructure(org.apache.curator.framework.CuratorFramework client, Set<String> groupNames)
client
- CuratorFramework
instancegroupNames
- set of group namespublic String getGroupZNodePath(String groupName)
groupName
- group namepublic String getActingAsNodesZNodePath(String groupName, String nodeName)
public String getClusterLockZNodePathSuffix(String nodeName)
FailoverClusterPaths
getClusterLockZNodePathSuffix
in class FailoverClusterPaths
nodeName
- the name of the node, group etc.public String getStrategyName()
FailoverClusterPaths
getStrategyName
in class FailoverClusterPaths
public String getGroupName()
public String getMyNodeActiveEphemeralZNodePath()
Copyright © 2016–2019 AdroitLogic. All rights reserved.