public class ClusterPaths extends Object
Constructor and Description |
---|
ClusterPaths() |
Modifier and Type | Method and Description |
---|---|
void |
createAll(org.apache.curator.framework.CuratorFramework client)
Creates all the paths required for the clustering in the zookeeper.
|
String |
getArchivedCommandPathFromVersion(int version)
Generates the ZNode path of an archived command by appending the version number.
|
String |
getArchivedCommandsZNodePath() |
String |
getArchivedCommandsZNodeRoot() |
String |
getCommandSpaceZnodePath() |
String |
getCommandSpaceZnodeRoot() |
String |
getCommandsZNodePath() |
String |
getCommandsZNodeRoot() |
String |
getCurrentCommandPathFromVersion(int version)
Generates the ZNode path in which the ZNode to publish a command has to be created
|
String |
getCurrentCommandsZNodePath() |
String |
getCurrentCommandsZNodeRoot() |
String |
getDomain() |
String |
getDomainZNodePath() |
String |
getDomainZNodeRoot() |
String |
getLocksZNodePath() |
String |
getLocksZNodeRoot() |
String |
getNodeCommandFailedPath(int version)
Given a command version, this method returns the
|
String |
getNodeCommandFailedPath(String basePath)
Given the command path, generates the
|
String |
getNodeCommandSuccessPath(int version)
Given a command version, this method returns the
|
String |
getNodeCommandSuccessPath(String basePath)
Given the command path, generates the
|
String |
getNodeName() |
String |
getSequencesZNodePath() |
String |
getSequencesZNodeRoot() |
ClusterPaths |
initialize(String domain,
String nodeName,
String commandSpace)
Creates the paths used by this node's cluster manager for clustering functions.
|
public ClusterPaths initialize(String domain, String nodeName, String commandSpace)
domain
- this node's domainnodeName
- the name of the server node that is being initializedcommandSpace
- the space name for the commandsClusterPaths
public void createAll(org.apache.curator.framework.CuratorFramework client)
client
- curatorFramework instancepublic String getCurrentCommandPathFromVersion(int version)
version
- version numberpublic String getArchivedCommandPathFromVersion(int version)
version
- sequence number corresponding to the commandpublic String getNodeCommandFailedPath(int version)
commandPath/failedpath.
version
- command versionpublic String getNodeCommandFailedPath(String basePath)
commandPath/failed/${nodeName}
basePath
- command's pathpublic String getNodeCommandSuccessPath(int version)
commandPath/successpath.
version
- command versionpublic String getNodeCommandSuccessPath(String basePath)
commandPath/success/${nodeName}
basePath
- command's pathpublic String getLocksZNodeRoot()
public String getSequencesZNodeRoot()
public String getCommandsZNodePath()
public String getCommandsZNodeRoot()
public String getCurrentCommandsZNodeRoot()
public String getCurrentCommandsZNodePath()
public String getArchivedCommandsZNodePath()
public String getArchivedCommandsZNodeRoot()
public String getNodeName()
public String getDomain()
public String getDomainZNodePath()
public String getDomainZNodeRoot()
public String getLocksZNodePath()
public String getSequencesZNodePath()
public String getCommandSpaceZnodePath()
public String getCommandSpaceZnodeRoot()
Copyright © 2016–2019 AdroitLogic. All rights reserved.