本文整理了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
[英]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
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
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
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
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
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
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);
}
}