- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.netflix.curator.utils.ZKPaths.getPathAndNode()
方法的一些代码示例,展示了ZKPaths.getPathAndNode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKPaths.getPathAndNode()
方法的具体详情如下:
包路径:com.netflix.curator.utils.ZKPaths
类名称:ZKPaths
方法名:getPathAndNode
[英]Given a full path, return the node name and its path. i.e. "/one/two/three" will return {"/one/two", "three"}
[中]给定完整路径,返回节点名称及其路径。i、 e.“/one/two/three”将返回{/one/two”,“three”}
代码示例来源:origin: com.netflix.curator/curator-recipes
/**
* NOTE: this is a BLOCKING method. Rebuild the internal cache for the given node by querying
* for all needed data WITHOUT generating any events to send to listeners.
*
* @param fullPath full path of the node to rebuild
* @throws Exception errors
*/
public void rebuildNode(String fullPath) throws Exception
{
Preconditions.checkArgument(ZKPaths.getPathAndNode(fullPath).getPath().equals(path), "Node is not part of this cache: " + fullPath);
Preconditions.checkState(!executorService.isShutdown(), "cache has been closed");
ensurePath.ensure(client.getZookeeperClient());
internalRebuildNode(fullPath);
// this is necessary so that any updates that occurred while rebuilding are taken
// have to rebuild entire tree in case this node got deleted in the interim
offerOperation(new RefreshOperation(this, RefreshMode.FORCE_GET_DATA_AND_STAT));
}
代码示例来源:origin: com.netflix.curator/curator-framework
private String adjustPath(String path) throws Exception
{
if ( doProtected )
{
ZKPaths.PathAndNode pathAndNode = ZKPaths.getPathAndNode(path);
String name = getProtectedPrefix() + pathAndNode.getNode();
path = ZKPaths.makePath(pathAndNode.getPath(), name);
}
return path;
}
}
代码示例来源:origin: com.netflix.curator/curator-framework
try
final ZKPaths.PathAndNode pathAndNode = ZKPaths.getPathAndNode(path);
List<String> children = client.getZooKeeper().getChildren(pathAndNode.getPath(), false);
本文整理了Java中org.apache.curator.utils.ZKPaths.getPathAndNode()方法的一些代码示例,展示了ZKPaths.getPathAndNode()的具体用
本文整理了Java中com.netflix.curator.utils.ZKPaths.getPathAndNode()方法的一些代码示例,展示了ZKPaths.getPathAndNode()的具体
我是一名优秀的程序员,十分优秀!