热门标签 | 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);
}
}

推荐阅读
  • 先看官方文档TheJavaTutorialshavebeenwrittenforJDK8.Examplesandpracticesdescribedinthispagedontta ... [详细]
  • Spring框架《一》简介
    Spring框架《一》1.Spring概述1.1简介1.2Spring模板二、IOC容器和Bean1.IOC和DI简介2.三种通过类型获取bean3.给bean的属性赋值3.1依赖 ... [详细]
  • 本文整理了Java中com.evernote.android.job.JobRequest.getTransientExtras()方法的一些代码示例,展示了 ... [详细]
  • 本文整理了Java中org.apache.solr.common.SolrDocument.setField()方法的一些代码示例,展示了SolrDocum ... [详细]
  • VScode格式化文档换行或不换行的设置方法
    本文介绍了在VScode中设置格式化文档换行或不换行的方法,包括使用插件和修改settings.json文件的内容。详细步骤为:找到settings.json文件,将其中的代码替换为指定的代码。 ... [详细]
  • 学习笔记(34):第三阶段4.2.6:SpringCloud Config配置中心的应用与原理第三阶段4.2.6SpringCloud Config配置中心的应用与原理
    立即学习:https:edu.csdn.netcourseplay29983432482?utm_sourceblogtoedu配置中心得核心逻辑springcloudconfi ... [详细]
  • 本文介绍了Oracle数据库中tnsnames.ora文件的作用和配置方法。tnsnames.ora文件在数据库启动过程中会被读取,用于解析LOCAL_LISTENER,并且与侦听无关。文章还提供了配置LOCAL_LISTENER和1522端口的示例,并展示了listener.ora文件的内容。 ... [详细]
  • Java学习笔记之面向对象编程(OOP)
    本文介绍了Java学习笔记中的面向对象编程(OOP)内容,包括OOP的三大特性(封装、继承、多态)和五大原则(单一职责原则、开放封闭原则、里式替换原则、依赖倒置原则)。通过学习OOP,可以提高代码复用性、拓展性和安全性。 ... [详细]
  • C++字符字符串处理及字符集编码方案
    本文介绍了C++中字符字符串处理的问题,并详细解释了字符集编码方案,包括UNICODE、Windows apps采用的UTF-16编码、ASCII、SBCS和DBCS编码方案。同时说明了ANSI C标准和Windows中的字符/字符串数据类型实现。文章还提到了在编译时需要定义UNICODE宏以支持unicode编码,否则将使用windows code page编译。最后,给出了相关的头文件和数据类型定义。 ... [详细]
  • r2dbc配置多数据源
    R2dbc配置多数据源问题根据官网配置r2dbc连接mysql多数据源所遇到的问题pom配置可以参考官网,不过我这样配置会报错我并没有这样配置将以下内容添加到pom.xml文件d ... [详细]
  • 本文介绍了如何清除Eclipse中SVN用户的设置。首先需要查看使用的SVN接口,然后根据接口类型找到相应的目录并删除相关文件。最后使用SVN更新或提交来应用更改。 ... [详细]
  • 本文详细介绍了git常用命令及其操作方法,包括查看、添加、提交、删除、找回等操作,以及如何重置修改文件、抛弃工作区修改、将工作文件提交到本地暂存区、从版本库中删除文件等。同时还介绍了如何从暂存区恢复到工作文件、恢复最近一次提交过的状态,以及如何合并多个操作等。 ... [详细]
  • 深入理解Java虚拟机的并发编程与性能优化
    本文主要介绍了Java内存模型与线程的相关概念,探讨了并发编程在服务端应用中的重要性。同时,介绍了Java语言和虚拟机提供的工具,帮助开发人员处理并发方面的问题,提高程序的并发能力和性能优化。文章指出,充分利用计算机处理器的能力和协调线程之间的并发操作是提高服务端程序性能的关键。 ... [详细]
  • 本文整理了Java中java.lang.NoSuchMethodError.getMessage()方法的一些代码示例,展示了NoSuchMethodErr ... [详细]
  • 本文介绍了在Ubuntu系统中清理残余配置文件和无用内容的方法,包括清理残余配置文件、清理下载缓存包、清理不再需要的包、清理无用的语言文件和清理无用的翻译内容。通过这些清理操作可以节省硬盘空间,提高系统的运行效率。 ... [详细]
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社区 版权所有