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

推荐阅读
  • C++字符字符串处理及字符集编码方案
    本文介绍了C++中字符字符串处理的问题,并详细解释了字符集编码方案,包括UNICODE、Windows apps采用的UTF-16编码、ASCII、SBCS和DBCS编码方案。同时说明了ANSI C标准和Windows中的字符/字符串数据类型实现。文章还提到了在编译时需要定义UNICODE宏以支持unicode编码,否则将使用windows code page编译。最后,给出了相关的头文件和数据类型定义。 ... [详细]
  • 本文介绍了Android 7的学习笔记总结,包括最新的移动架构视频、大厂安卓面试真题和项目实战源码讲义。同时还分享了开源的完整内容,并提醒读者在使用FileProvider适配时要注意不同模块的AndroidManfiest.xml中配置的xml文件名必须不同,否则会出现问题。 ... [详细]
  • 在Android开发中,使用Picasso库可以实现对网络图片的等比例缩放。本文介绍了使用Picasso库进行图片缩放的方法,并提供了具体的代码实现。通过获取图片的宽高,计算目标宽度和高度,并创建新图实现等比例缩放。 ... [详细]
  • 本文介绍了设计师伊振华受邀参与沈阳市智慧城市运行管理中心项目的整体设计,并以数字赋能和创新驱动高质量发展的理念,建设了集成、智慧、高效的一体化城市综合管理平台,促进了城市的数字化转型。该中心被称为当代城市的智能心脏,为沈阳市的智慧城市建设做出了重要贡献。 ... [详细]
  • 向QTextEdit拖放文件的方法及实现步骤
    本文介绍了在使用QTextEdit时如何实现拖放文件的功能,包括相关的方法和实现步骤。通过重写dragEnterEvent和dropEvent函数,并结合QMimeData和QUrl等类,可以轻松实现向QTextEdit拖放文件的功能。详细的代码实现和说明可以参考本文提供的示例代码。 ... [详细]
  • Linux重启网络命令实例及关机和重启示例教程
    本文介绍了Linux系统中重启网络命令的实例,以及使用不同方式关机和重启系统的示例教程。包括使用图形界面和控制台访问系统的方法,以及使用shutdown命令进行系统关机和重启的句法和用法。 ... [详细]
  • 本文介绍了C#中生成随机数的三种方法,并分析了其中存在的问题。首先介绍了使用Random类生成随机数的默认方法,但在高并发情况下可能会出现重复的情况。接着通过循环生成了一系列随机数,进一步突显了这个问题。文章指出,随机数生成在任何编程语言中都是必备的功能,但Random类生成的随机数并不可靠。最后,提出了需要寻找其他可靠的随机数生成方法的建议。 ... [详细]
  • 本文主要解析了Open judge C16H问题中涉及到的Magical Balls的快速幂和逆元算法,并给出了问题的解析和解决方法。详细介绍了问题的背景和规则,并给出了相应的算法解析和实现步骤。通过本文的解析,读者可以更好地理解和解决Open judge C16H问题中的Magical Balls部分。 ... [详细]
  • eclipse学习(第三章:ssh中的Hibernate)——11.Hibernate的缓存(2级缓存,get和load)
    本文介绍了eclipse学习中的第三章内容,主要讲解了ssh中的Hibernate的缓存,包括2级缓存和get方法、load方法的区别。文章还涉及了项目实践和相关知识点的讲解。 ... [详细]
  • Python正则表达式学习记录及常用方法
    本文记录了学习Python正则表达式的过程,介绍了re模块的常用方法re.search,并解释了rawstring的作用。正则表达式是一种方便检查字符串匹配模式的工具,通过本文的学习可以掌握Python中使用正则表达式的基本方法。 ... [详细]
  • 自动轮播,反转播放的ViewPagerAdapter的使用方法和效果展示
    本文介绍了如何使用自动轮播、反转播放的ViewPagerAdapter,并展示了其效果。该ViewPagerAdapter支持无限循环、触摸暂停、切换缩放等功能。同时提供了使用GIF.gif的示例和github地址。通过LoopFragmentPagerAdapter类的getActualCount、getActualItem和getActualPagerTitle方法可以实现自定义的循环效果和标题展示。 ... [详细]
  • CF:3D City Model(小思维)问题解析和代码实现
    本文通过解析CF:3D City Model问题,介绍了问题的背景和要求,并给出了相应的代码实现。该问题涉及到在一个矩形的网格上建造城市的情景,每个网格单元可以作为建筑的基础,建筑由多个立方体叠加而成。文章详细讲解了问题的解决思路,并给出了相应的代码实现供读者参考。 ... [详细]
  • 本文介绍了南邮ctf-web的writeup,包括签到题和md5 collision。在CTF比赛和渗透测试中,可以通过查看源代码、代码注释、页面隐藏元素、超链接和HTTP响应头部来寻找flag或提示信息。利用PHP弱类型,可以发现md5('QNKCDZO')='0e830400451993494058024219903391'和md5('240610708')='0e462097431906509019562988736854'。 ... [详细]
  • 前景:当UI一个查询条件为多项选择,或录入多个条件的时候,比如查询所有名称里面包含以下动态条件,需要模糊查询里面每一项时比如是这样一个数组条件:newstring[]{兴业银行, ... [详细]
  • Java学习笔记之面向对象编程(OOP)
    本文介绍了Java学习笔记中的面向对象编程(OOP)内容,包括OOP的三大特性(封装、继承、多态)和五大原则(单一职责原则、开放封闭原则、里式替换原则、依赖倒置原则)。通过学习OOP,可以提高代码复用性、拓展性和安全性。 ... [详细]
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社区 版权所有