- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中co.cask.cdap.common.zookeeper.ZKExtOperations.updateOrCreate()
方法的一些代码示例,展示了ZKExtOperations.updateOrCreate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKExtOperations.updateOrCreate()
方法的具体详情如下:
包路径:co.cask.cdap.common.zookeeper.ZKExtOperations
类名称:ZKExtOperations
方法名:updateOrCreate
[英]Update the content of the given node. If the node doesn't exist, it will try to create the node. Same as calling #updateOrCreate(ZKClient,String,Function,Codec,List)
[中]更新给定节点的内容。如果节点不存在,它将尝试创建节点。与调用#updateOrCreate(ZKClient、String、Function、Codec、List)相同
代码示例来源:origin: caskdata/cdap
/**
* Update the content of the given node. If the node doesn't exist, it will try to create the node. Same as calling
*
* {@link #updateOrCreate(ZKClient, String, AsyncFunction, Codec, List)
* updateOrCreate(zkClient, path, modifier, codec, null)}
*
* @see #updateOrCreate(ZKClient, String, AsyncFunction, Codec, List)
*/
public static <V> ListenableFuture<V> updateOrCreate(ZKClient zkClient, String path,
AsyncFunction<V, V> modifier, Codec<V> codec) {
return updateOrCreate(zkClient, path, modifier, codec, null);
}
代码示例来源:origin: co.cask.cdap/cdap-common
/**
* Update the content of the given node. If the node doesn't exist, it will try to create the node. Same as calling
*
* {@link #updateOrCreate(ZKClient, String, Function, Codec, List)
* updateOrCreate(zkClient, path, modifier, codec, null)}
*
* @see #updateOrCreate(ZKClient, String, Function, Codec, java.util.List)
*/
public static <V> ListenableFuture<V> updateOrCreate(ZKClient zkClient, String path,
Function<V, V> modifier, Codec<V> codec) {
return updateOrCreate(zkClient, path, modifier, codec, null);
}
代码示例来源:origin: co.cask.cdap/cdap-common
/**
* Update the content of the given node. If the node doesn't exist, it will try to create the node. Same as calling
*
* {@link #updateOrCreate(ZKClient, String, AsyncFunction, Codec, List)
* updateOrCreate(zkClient, path, modifier, codec, null)}
*
* @see #updateOrCreate(ZKClient, String, AsyncFunction, Codec, List)
*/
public static <V> ListenableFuture<V> updateOrCreate(ZKClient zkClient, String path,
AsyncFunction<V, V> modifier, Codec<V> codec) {
return updateOrCreate(zkClient, path, modifier, codec, null);
}
代码示例来源:origin: caskdata/cdap
/**
* Update the content of the given node. If the node doesn't exist, it will try to create the node. Same as calling
*
* {@link #updateOrCreate(ZKClient, String, Function, Codec, List)
* updateOrCreate(zkClient, path, modifier, codec, null)}
*
* @see #updateOrCreate(ZKClient, String, Function, Codec, java.util.List)
*/
public static <V> ListenableFuture<V> updateOrCreate(ZKClient zkClient, String path,
Function<V, V> modifier, Codec<V> codec) {
return updateOrCreate(zkClient, path, modifier, codec, null);
}
代码示例来源:origin: caskdata/cdap
/**
* Modify an existing {@link ResourceRequirement}.
*
* @param name Resource name
* @param modifier A function to modify an existing requirement. The function might get called multiple times
* if there are concurrent modifications from multiple clients.
* @return A {@link ListenableFuture} that will be completed when submission is completed and it'll carry the
* modified requirement as result or {@code null} if the modifier decided not to modify the requirement.
* The future will fail if failed to submit the requirement.
* Calling {@link ListenableFuture#cancel(boolean)} has no effect.
*/
public ListenableFuture<ResourceRequirement> modifyRequirement(String name, final ResourceModifier modifier) {
String zkPath = CoordinationConstants.REQUIREMENTS_PATH + "/" + name;
return ZKExtOperations.updateOrCreate(zkClient, zkPath, modifier, CoordinationConstants.RESOURCE_REQUIREMENT_CODEC);
}
代码示例来源:origin: co.cask.cdap/cdap-common
/**
* Modify an existing {@link ResourceRequirement}.
*
* @param name Resource name
* @param modifier A function to modify an existing requirement. The function might get called multiple times
* if there are concurrent modifications from multiple clients.
* @return A {@link ListenableFuture} that will be completed when submission is completed and it'll carry the
* modified requirement as result or {@code null} if the modifier decided not to modify the requirement.
* The future will fail if failed to submit the requirement.
* Calling {@link ListenableFuture#cancel(boolean)} has no effect.
*/
public ListenableFuture<ResourceRequirement> modifyRequirement(String name, final ResourceModifier modifier) {
String zkPath = CoordinationConstants.REQUIREMENTS_PATH + "/" + name;
return ZKExtOperations.updateOrCreate(zkClient, zkPath, modifier, CoordinationConstants.RESOURCE_REQUIREMENT_CODEC);
}
代码示例来源:origin: caskdata/cdap
@Override
public ListenableFuture<T> update(String name, PropertyUpdater<T> updater) {
return ZKExtOperations.updateOrCreate(zkClient, getPath(name), updater, codec);
}
代码示例来源:origin: co.cask.cdap/cdap-common
@Override
public ListenableFuture<T> update(String name, PropertyUpdater<T> updater) {
return ZKExtOperations.updateOrCreate(zkClient, getPath(name), updater, codec);
}
代码示例来源:origin: cdapio/cdap
ZKExtOperations.updateOrCreate(zkClient1, path, new Function<Integer, Integer>() {
ZKExtOperations.updateOrCreate(zkClient2, path, new Function<Integer, Integer>() {
Future<Integer> future1 = ZKExtOperations.updateOrCreate(zkClient1, path, modifier, INT_CODEC);
Future<Integer> future2 = ZKExtOperations.updateOrCreate(zkClient2, path, modifier, INT_CODEC);
Integer result = ZKExtOperations.updateOrCreate(zkClient1, path, new Function<Integer, Integer>() {
本文整理了Java中co.cask.cdap.common.zookeeper.ZKExtOperations.createOrSet()方法的一些代码示例,展示了ZKExtOperations.cr
本文整理了Java中co.cask.cdap.common.zookeeper.ZKExtOperations.updateOrCreate()方法的一些代码示例,展示了ZKExtOperations
本文整理了Java中co.cask.cdap.common.zookeeper.ZKExtOperations.setOrCreate()方法的一些代码示例,展示了ZKExtOperations.se
我是一名优秀的程序员,十分优秀!