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, initializepublic GroupFailoverClusterPaths(String groupName)
protected void initializeClusterPaths()
FailoverClusterPathsinitializeClusterPaths in class FailoverClusterPathsFailoverClusterPaths.initialize(ClusterPaths)protected void createAllClusterPaths(org.apache.curator.framework.CuratorFramework client)
FailoverClusterPathscreateAllClusterPaths in class FailoverClusterPathsclient - the curator framework to be used for creationFailoverClusterPaths.createAll(CuratorFramework)protected void clearAllClusterPaths(org.apache.curator.framework.CuratorFramework client)
FailoverClusterPathsclearAllClusterPaths in class FailoverClusterPathsclient - the curator framework to be used for clearingFailoverClusterPaths.clearAll(CuratorFramework)public void createAllEphemeralNodes(org.apache.curator.framework.CuratorFramework client)
FailoverClusterPathscreateAllEphemeralNodes in class FailoverClusterPathsclient - 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)
FailoverClusterPathsgetClusterLockZNodePathSuffix in class FailoverClusterPathsnodeName - the name of the node, group etc.public String getStrategyName()
FailoverClusterPathsgetStrategyName in class FailoverClusterPathspublic String getGroupName()
public String getMyNodeActiveEphemeralZNodePath()
Copyright © 2016–2019 AdroitLogic. All rights reserved.