badfail@qq.com+java_Java KeeperException.BadArgumentsException方法代码示例
import org.apache.zookeeper.KeeperException; //导入方法依赖的package包/类
private static String getMessage(Throwable cause) {
if (cause instanceof KeeperException) {
KeeperException keeperException = (KeeperException) cause;
if (keeperException instanceof KeeperException.NoNodeException) {
return "Node does not exist: " + keeperException.getPath();
} else if (keeperException instanceof KeeperException.NoChildrenForEphemeralsException) {
return "Ephemerals cannot have children: " + keeperException.getPath();
} else if (keeperException instanceof KeeperException.NodeExistsException) {
return "Node already exists: " + keeperException.getPath();
} else if (keeperException instanceof KeeperException.NotEmptyException) {
return "Node not empty: " + keeperException.getPath();
} else if (keeperException instanceof KeeperException.NotReadOnlyException) {
return "Not a read-only call: " + keeperException.getPath();
} else if (keeperException instanceof KeeperException.InvalidACLException) {
return "Acl is not valid : " + keeperException.getPath();
} else if (keeperException instanceof KeeperException.NoAuthException) {
return "Authentication is not valid : " + keeperException.getPath();
} else if (keeperException instanceof KeeperException.BadArgumentsException) {
return "Arguments are not valid : " + keeperException.getPath();
} else if (keeperException instanceof KeeperException.BadVersionException) {
return "version No is not valid : " + keeperException.getPath();
} else if (keeperException instanceof KeeperException.ReconfigInProgress) {
return "Another reconfiguration is in progress -- concurrent " +
"reconfigs not supported (yet)";
} else if (keeperException instanceof KeeperException.NewConfigNoQuorum) {
return "No quorum of new config is connected and " +
"up-to-date with the leader of last commmitted config - try invoking reconfiguration after " +
"new servers are connected and synced";
}
}
return cause.getMessage();
}
badfail@qq.com+java_Java KeeperException.BadArgumentsException方法代码示例相关推荐
- drawimage的用法 java_Java Graphics.drawImage方法代码示例
本文整理汇总了Java中javax.microedition.lcdui.Graphics.drawImage方法的典型用法代码示例.如果您正苦于以下问题:Java Graphics.drawImag ...
- findclass java_Java Context.findClass方法代码示例
import jdk.nashorn.internal.runtime.Context; //导入方法依赖的package包/类 private static Class> simpleType ...
- Bytes int java_Java Bytes.readInt方法代码示例
import net.openhft.chronicle.bytes.Bytes; //导入方法依赖的package包/类 @NotNull @Override public CharSequence ...
- object getkey java_Java S3Object.getKey方法代码示例
import com.amazonaws.services.s3.model.S3Object; //导入方法依赖的package包/类 private S3Object decipher(GetOb ...
- fileset java_Java FileSet.iterator方法代码示例
import org.apache.tools.ant.types.FileSet; //导入方法依赖的package包/类 public void execute() throws BuildExc ...
- x509代码实例java_Java X509AttributeCertificate.getIssuer方法代码示例
import org.bouncycastle.x509.X509AttributeCertificate; //导入方法依赖的package包/类 /** * Parses the contents ...
- toolbar java_Java ToolBar.layout方法代码示例
import org.eclipse.swt.widgets.ToolBar; //导入方法依赖的package包/类 protected ToolBar createToolbar() { fina ...
- okhttputils java_Java OkHttpUtils.post方法代码示例
import com.zhy.http.okhttp.OkHttpUtils; //导入方法依赖的package包/类 @Override public void performRequestAsyn ...
- getAttribute实例例java_Java ExifInterface.getAttribute方法代码示例
import android.media.ExifInterface; //导入方法依赖的package包/类 public static void copyExif(ExifInterface or ...
最新文章
- Linux Yum命令(转)
- Android的消息机制(2)
- 201771010101 白玛次仁 《2018面向对象程序设计(Java)课程学习进度条》
- 1.4 Hive和数据库的比较
- Java Web 之Token+Cookie+Session
- 转载并学习实现三重DES加密解密代码(一)
- 书籍推荐-记这几年看的书
- asp.net 取windows的所有进程
- 三位数组的轴python_关于numpy数组轴的使用详解
- Docker启动失败提示【exec user process caused: exec format error】
- 人工智能——数据、信息与知识
- Spring mvc框架下使用kaptcha生成验证码
- Android开发之旅-Fragment和Activity之间onCreateOptionsMenu的联系
- Metamaterials perform image compression before light reaches the sensor(微波成像,拍摄与压缩同步进行)
- DBA_OBJECTS
- python语言开发环境配置理论_python语言开发环境配置
- 华为NP课程笔记23-VRRP
- 计算机组成原理乘法设计,资料计算机组成原理课设 定点补码一位乘法器的设计.doc...
- 使用WangEditor编辑器使用图片上传功能
- 大数据十道经典海量数据处理面试题与十个方法大总结
热门文章
- 嵌入式端音频开发(Unisound篇)之 7.1 蜂鸟M离线语音芯片简介
- Redis入门指南之复制
- 重命名技巧,支持多个文件夹快速重命名
- jQuery-获取/设置 属性(标准属性,自定义属性)和内容
- WS-Trust和WS-SecureConversation
- appemit使用mpvPlayer在谷歌chrome浏览器播放RTSP
- 2022纪中游记(进行中)
- 在宝塔部署出现require(): open_basedir restriction in effect. File解决办法
- Spring5 框架新功能(Webflux)
- MySQL分组查询,获取分组后数据