热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.apache.curator.framework.recipes.cache.ChildData.getStat()方法的使用及代码示例

本文整理了Java中org.apache.curator.framework.recipes.cache.ChildData.getStat()方法的一些代码示例,展示

本文整理了Java中org.apache.curator.framework.recipes.cache.ChildData.getStat()方法的一些代码示例,展示了ChildData.getStat()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ChildData.getStat()方法的具体详情如下:
包路径:org.apache.curator.framework.recipes.cache.ChildData
类名称:ChildData
方法名:getStat

ChildData.getStat介绍

[英]Returns the stat data for this child
[中]返回此子项的统计数据

代码示例

代码示例来源:origin: soabase/exhibitor

@Override
public LoadedInstanceConfig loadConfig() throws Exception
{
int version = -1;
Properties properties = new Properties();
ChildData childData = getConfigNode();
if ( childData != null )
{
version = childData.getStat().getVersion();
properties.load(new ByteArrayInputStream(childData.getData()));
}
PropertyBasedInstanceConfig cOnfig= new PropertyBasedInstanceConfig(properties, defaults);
return new LoadedInstanceConfig(config, version);
}

代码示例来源:origin: alipay/sofa-rpc

/**
* Remove Provider
*
* @param config ConsumerConfig
* @param providerPath Provider path of zookeeper
* @param data Event data
* @param currentData provider data list
* @throws UnsupportedEncodingException decode error
*/
public void removeProvider(ConsumerConfig config, String providerPath, ChildData data, List currentData)
throws UnsupportedEncodingException {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(),
"Receive remove provider: path=[" + data.getPath() + "]" + ", data=[" +
StringSerializer.decode(data.getData()) + "]" + ", stat=[" + data.getStat() + "]" + ", list=[" +
currentData.size() + "]");
}
notifyListeners(config, providerPath, currentData, false);
}

代码示例来源:origin: alipay/sofa-rpc

/**
* Update Provider
*
* @param config ConsumerConfig
* @param providerPath Provider path of zookeeper
* @param data Event data
* @param currentData provider data list
* @throws UnsupportedEncodingException decode error
*/
public void updateProvider(ConsumerConfig config, String providerPath, ChildData data, List currentData)
throws UnsupportedEncodingException {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(),
"Receive update provider: path=[" + data.getPath() + "]" + ", data=[" +
StringSerializer.decode(data.getData()) + "]" + ", stat=[" + data.getStat() + "]" + ", list=[" +
currentData.size() + "]");
}
notifyListeners(config, providerPath, currentData, false);
}

代码示例来源:origin: alipay/sofa-rpc

/**
* Add provider
*
* @param config ConsumerConfig
* @param providerPath Provider path of zookeeper
* @param data Event data
* @param currentData provider data list
* @throws UnsupportedEncodingException decode error
*/
public void addProvider(ConsumerConfig config, String providerPath, ChildData data, List currentData)
throws UnsupportedEncodingException {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(),
"Receive add provider: path=[" + data.getPath() + "]" + ", data=[" +
StringSerializer.decode(data.getData()) + "]" + ", stat=[" + data.getStat() + "]" + ", list=[" +
currentData.size() + "]");
}
notifyListeners(config, providerPath, currentData, true);
}

代码示例来源:origin: alipay/sofa-rpc

/**
* Add provider
*
* @param config ConsumerConfig
* @param providerPath Provider path of zookeeper
* @param data Event data
* @param currentData provider data list
* @throws UnsupportedEncodingException decode error
*/
public void addProvider(ConsumerConfig config, String providerPath, ChildData data, List currentData)
throws UnsupportedEncodingException {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(),
"Receive add provider: path=[" + data.getPath() + "]" + ", data=[" +
StringSerializer.decode(data.getData()) + "]" + ", stat=[" + data.getStat() + "]" + ", list=[" +
currentData.size() + "]");
}
notifyListeners(config, providerPath, currentData, true);
}

代码示例来源:origin: alipay/sofa-rpc

/**
* Remove Provider
*
* @param config ConsumerConfig
* @param providerPath Provider path of zookeeper
* @param data Event data
* @param currentData provider data list
* @throws UnsupportedEncodingException decode error
*/
public void removeProvider(ConsumerConfig config, String providerPath, ChildData data, List currentData)
throws UnsupportedEncodingException {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(),
"Receive remove provider: path=[" + data.getPath() + "]" + ", data=[" +
StringSerializer.decode(data.getData()) + "]" + ", stat=[" + data.getStat() + "]" + ", list=[" +
currentData.size() + "]");
}
notifyListeners(config, providerPath, currentData, false);
}

代码示例来源:origin: alipay/sofa-rpc

/**
* Update Provider
*
* @param config ConsumerConfig
* @param providerPath Provider path of zookeeper
* @param data Event data
* @param currentData provider data list
* @throws UnsupportedEncodingException decode error
*/
public void updateProvider(ConsumerConfig config, String providerPath, ChildData data, List currentData)
throws UnsupportedEncodingException {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(),
"Receive update provider: path=[" + data.getPath() + "]" + ", data=[" +
StringSerializer.decode(data.getData()) + "]" + ", stat=[" + data.getStat() + "]" + ", list=[" +
currentData.size() + "]");
}
notifyListeners(config, providerPath, currentData, false);
}

代码示例来源:origin: alipay/sofa-rpc

/**
* 接口配置修改子节点Data
*
* @param config 接口配置
* @param configPath 配置Path
* @param data 子节点Data
*/
public void updateConfig(AbstractInterfaceConfig config, String configPath, ChildData data) {
if (data == null) {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive update data is null");
}
} else {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive update data: path=[" + data.getPath() + "]"
+ ", data=[" + StringSerializer.decode(data.getData()) + "]"
+ ", stat=[" + data.getStat() + "]");
}
notifyListeners(config, configPath, data, false);
}
}

代码示例来源:origin: alipay/sofa-rpc

/**
* 接口配置删除子节点Data
*
* @param config 接口配置
* @param configPath 配置Path
* @param data 子节点Data
*/
public void removeConfig(AbstractInterfaceConfig config, String configPath, ChildData data) {
if (data == null) {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive remove data is null");
}
} else {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive remove data: path=[" + data.getPath() + "]"
+ ", data=[" + StringSerializer.decode(data.getData()) + "]"
+ ", stat=[" + data.getStat() + "]");
}
notifyListeners(config, configPath, data, true);
}
}

代码示例来源:origin: alipay/sofa-rpc

/**
* 接口配置修改子节点Data
*
* @param config 接口配置
* @param overridePath 覆盖Path
* @param data 子节点Data
* @throws Exception 转换配置异常
*/
public void updateConfig(AbstractInterfaceConfig config, String overridePath, ChildData data) throws Exception {
if (data == null) {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive update data is null");
}
} else {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive update data: path=[" + data.getPath() + "]" +
", data=[" + StringSerializer.decode(data.getData()) + "]" + ", stat=[" + data.getStat() + "]");
}
notifyListeners(config, overridePath, data, false, null);
}
}

代码示例来源:origin: alipay/sofa-rpc

/**
* 接口配置新增子节点Data
*
* @param config 接口配置
* @param overridePath 覆盖Path
* @param data 子节点Data
* @throws Exception 转换配置异常
*/
public void addConfig(AbstractInterfaceConfig config, String overridePath, ChildData data) throws Exception {
if (data == null) {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive data is null");
}
} else {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive add data: path=[" + data.getPath() + "]" + ", data=[" +
StringSerializer.decode(data.getData()) + "]" + ", stat=[" + data.getStat() + "]");
}
notifyListeners(config, overridePath, data, false, null);
}
}

代码示例来源:origin: alipay/sofa-rpc

/**
* 接口配置修改子节点Data
*
* @param config 接口配置
* @param configPath 配置Path
* @param data 子节点Data
*/
public void updateConfig(AbstractInterfaceConfig config, String configPath, ChildData data) {
if (data == null) {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive update data is null");
}
} else {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive update data: path=[" + data.getPath() + "]"
+ ", data=[" + StringSerializer.decode(data.getData()) + "]"
+ ", stat=[" + data.getStat() + "]");
}
notifyListeners(config, configPath, data, false);
}
}

代码示例来源:origin: alipay/sofa-rpc

/**
* 接口配置修改子节点Data
*
* @param config 接口配置
* @param overridePath 覆盖Path
* @param data 子节点Data
* @throws Exception 转换配置异常
*/
public void updateConfig(AbstractInterfaceConfig config, String overridePath, ChildData data) throws Exception {
if (data == null) {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive update data is null");
}
} else {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive update data: path=[" + data.getPath() + "]" +
", data=[" + StringSerializer.decode(data.getData()) + "]" + ", stat=[" + data.getStat() + "]");
}
notifyListeners(config, overridePath, data, false, null);
}
}

代码示例来源:origin: alipay/sofa-rpc

/**
* 接口配置新增子节点Data
*
* @param config 接口配置
* @param overridePath 覆盖Path
* @param data 子节点Data
* @throws Exception 转换配置异常
*/
public void addConfig(AbstractInterfaceConfig config, String overridePath, ChildData data) throws Exception {
if (data == null) {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive data is null");
}
} else {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive add data: path=[" + data.getPath() + "]" + ", data=[" +
StringSerializer.decode(data.getData()) + "]" + ", stat=[" + data.getStat() + "]");
}
notifyListeners(config, overridePath, data, false, null);
}
}

代码示例来源:origin: alipay/sofa-rpc

/**
* 接口配置新增子节点Data
*
* @param config 接口配置
* @param configPath 配置Path
* @param data 子节点Data
*/
public void addConfig(AbstractInterfaceConfig config, String configPath, ChildData data) {
if (data == null) {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive add data is null");
}
} else {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive add data: path=[" + data.getPath() + "]"
+ ", data=[" + StringSerializer.decode(data.getData()) + "]"
+ ", stat=[" + data.getStat() + "]");
}
notifyListeners(config, configPath, data, false);
}
}

代码示例来源:origin: alipay/sofa-rpc

/**
* 接口配置新增子节点Data
*
* @param config 接口配置
* @param configPath 配置Path
* @param data 子节点Data
*/
public void addConfig(AbstractInterfaceConfig config, String configPath, ChildData data) {
if (data == null) {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive add data is null");
}
} else {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive add data: path=[" + data.getPath() + "]"
+ ", data=[" + StringSerializer.decode(data.getData()) + "]"
+ ", stat=[" + data.getStat() + "]");
}
notifyListeners(config, configPath, data, false);
}
}

代码示例来源:origin: alipay/sofa-rpc

/**
* 接口配置删除子节点Data
*
* @param config 接口配置
* @param configPath 配置Path
* @param data 子节点Data
*/
public void removeConfig(AbstractInterfaceConfig config, String configPath, ChildData data) {
if (data == null) {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive remove data is null");
}
} else {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive remove data: path=[" + data.getPath() + "]"
+ ", data=[" + StringSerializer.decode(data.getData()) + "]"
+ ", stat=[" + data.getStat() + "]");
}
notifyListeners(config, configPath, data, true);
}
}

代码示例来源:origin: alipay/sofa-rpc

LOGGER.infoWithApp(config.getAppName(),
"Receive updateAll data: path=[" + data.getPath() + "], data=[" +
StringSerializer.decode(data.getData()) + "]" + ", stat=[" + data.getStat() + "]");

代码示例来源:origin: alipay/sofa-rpc

/**
* 接口配置删除子节点Data
*
* @param config 接口配置
* @param overridePath 覆盖Path
* @param data 子节点Data
* @param registerConfig 注册配置
* @throws Exception 转换配置异常
*/
public void removeConfig(AbstractInterfaceConfig config, String overridePath, ChildData data,
AbstractInterfaceConfig registerConfig)
throws Exception {
if (data == null) {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive data is null");
}
} else if (registerCOnfig== null) {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Register config is null");
}
} else {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive data: path=[" + data.getPath() + "]" + ", data=[" +
StringSerializer.decode(data.getData()) + "]" + ", stat=[" + data.getStat() + "]");
}
notifyListeners(config, overridePath, data, true, registerConfig);
}
}

代码示例来源:origin: alipay/sofa-rpc

/**
* 接口配置删除子节点Data
*
* @param config 接口配置
* @param overridePath 覆盖Path
* @param data 子节点Data
* @param registerConfig 注册配置
* @throws Exception 转换配置异常
*/
public void removeConfig(AbstractInterfaceConfig config, String overridePath, ChildData data,
AbstractInterfaceConfig registerConfig)
throws Exception {
if (data == null) {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive data is null");
}
} else if (registerCOnfig== null) {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Register config is null");
}
} else {
if (LOGGER.isInfoEnabled(config.getAppName())) {
LOGGER.infoWithApp(config.getAppName(), "Receive data: path=[" + data.getPath() + "]" + ", data=[" +
StringSerializer.decode(data.getData()) + "]" + ", stat=[" + data.getStat() + "]");
}
notifyListeners(config, overridePath, data, true, registerConfig);
}
}

推荐阅读
author-avatar
杜_森后_665
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有