本文整理汇总了Java中org.apache.zookeeper.ZooDefs.OpCode.exists方法的典型用法代码示例。如果您正苦于以下问题:Java OpCode.exists方法的具体用法?Java OpCode.exists怎么用?Java OpCode.exists使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.zookeeper.ZooDefs.OpCode
的用法示例。
在下文中一共展示了OpCode.exists方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isQuorum
import org.apache.zookeeper.ZooDefs.OpCode; //导入方法依赖的package包/类
static boolean isQuorum(int type) {
switch (type) {
case OpCode.exists:
case OpCode.getACL:
case OpCode.getChildren:
case OpCode.getChildren2:
case OpCode.getData:
return false;
case OpCode.error:
case OpCode.closeSession:
case OpCode.create:
case OpCode.createSession:
case OpCode.delete:
case OpCode.setACL:
case OpCode.setData:
case OpCode.check:
case OpCode.multi:
return true;
default:
return false;
}
}
示例2: isQuorum
import org.apache.zookeeper.ZooDefs.OpCode; //导入方法依赖的package包/类
static boolean isQuorum(int type) {
switch (type) {
case OpCode.exists:
case OpCode.getACL:
case OpCode.getChildren:
case OpCode.getChildren2:
case OpCode.getData:
return false;
case OpCode.error:
case OpCode.closeSession:
case OpCode.create:
case OpCode.createSession:
case OpCode.delete:
case OpCode.setACL:
case OpCode.setData:
return true;
default:
return false;
}
}
示例3: op2String
import org.apache.zookeeper.ZooDefs.OpCode; //导入方法依赖的package包/类
static String op2String(int op) {
switch (op) {
case OpCode.notification:
return "notification";
case OpCode.create:
return "create";
case OpCode.delete:
return "delete";
case OpCode.exists:
return "exists";
case OpCode.getData:
return "getDate";
case OpCode.setData:
return "setData";
case OpCode.multi:
return "multi";
case OpCode.getACL:
return "getACL";
case OpCode.setACL:
return "setACL";
case OpCode.getChildren:
return "getChildren";
case OpCode.getChildren2:
return "getChildren2";
case OpCode.ping:
return "ping";
case OpCode.createSession:
return "createSession";
case OpCode.closeSession:
return "closeSession";
case OpCode.error:
return "error";
default:
return "unknown " + op;
}
}
示例4: isValid
import org.apache.zookeeper.ZooDefs.OpCode; //导入方法依赖的package包/类
/**
* is the packet type a valid packet in zookeeper
*
* @param type
* the type of the packet
* @return true if a valid packet, false if not
*/
static boolean isValid(int type) {
// make sure this is always synchronized with Zoodefs!!
switch (type) {
case OpCode.notification:
return false;
case OpCode.create:
case OpCode.delete:
case OpCode.createSession:
case OpCode.exists:
case OpCode.getData:
case OpCode.check:
case OpCode.multi:
case OpCode.setData:
case OpCode.sync:
case OpCode.getACL:
case OpCode.setACL:
case OpCode.getChildren:
case OpCode.getChildren2:
case OpCode.ping:
case OpCode.closeSession:
case OpCode.setWatches:
return true;
default:
return false;
}
}
示例5: isValid
import org.apache.zookeeper.ZooDefs.OpCode; //导入方法依赖的package包/类
/**
* is the packet type a valid packet in zookeeper
*
* @param type
* the type of the packet
* @return true if a valid packet, false if not
*/
static boolean isValid(int type) {
// make sure this is always synchronized with Zoodefs!!
switch (type) {
case OpCode.notification:
return false;
case OpCode.check:
case OpCode.closeSession:
case OpCode.create:
case OpCode.create2:
case OpCode.createTTL:
case OpCode.createContainer:
case OpCode.createSession:
case OpCode.delete:
case OpCode.deleteContainer:
case OpCode.exists:
case OpCode.getACL:
case OpCode.getChildren:
case OpCode.getChildren2:
case OpCode.getData:
case OpCode.multi:
case OpCode.ping:
case OpCode.reconfig:
case OpCode.setACL:
case OpCode.setData:
case OpCode.setWatches:
case OpCode.sync:
case OpCode.checkWatches:
case OpCode.removeWatches:
return true;
default:
return false;
}
}
示例6: isQuorum
import org.apache.zookeeper.ZooDefs.OpCode; //导入方法依赖的package包/类
public boolean isQuorum() {
switch (this.type) {
case OpCode.exists:
case OpCode.getACL:
case OpCode.getChildren:
case OpCode.getChildren2:
case OpCode.getData:
return false;
case OpCode.create:
case OpCode.create2:
case OpCode.createTTL:
case OpCode.createContainer:
case OpCode.error:
case OpCode.delete:
case OpCode.deleteContainer:
case OpCode.setACL:
case OpCode.setData:
case OpCode.check:
case OpCode.multi:
case OpCode.reconfig:
return true;
case OpCode.closeSession:
case OpCode.createSession:
return !this.isLocalSession;
default:
return false;
}
}
示例7: isValid
import org.apache.zookeeper.ZooDefs.OpCode; //导入方法依赖的package包/类
/**
* is the packet type a valid packet in zookeeper
*
* @param type
* the type of the packet
* @return true if a valid packet, false if not
*/
static boolean isValid(int type) {
// make sure this is always synchronized with Zoodefs!!
switch (type) {
case OpCode.notification:
return false;
case OpCode.check:
case OpCode.closeSession:
case OpCode.create:
case OpCode.create2:
case OpCode.createContainer:
case OpCode.createSession:
case OpCode.delete:
case OpCode.deleteContainer:
case OpCode.exists:
case OpCode.getACL:
case OpCode.getChildren:
case OpCode.getChildren2:
case OpCode.getData:
case OpCode.multi:
case OpCode.ping:
case OpCode.reconfig:
case OpCode.setACL:
case OpCode.setData:
case OpCode.setWatches:
case OpCode.sync:
case OpCode.checkWatches:
case OpCode.removeWatches:
return true;
default:
return false;
}
}
示例8: isQuorum
import org.apache.zookeeper.ZooDefs.OpCode; //导入方法依赖的package包/类
public boolean isQuorum() {
switch (this.type) {
case OpCode.exists:
case OpCode.getACL:
case OpCode.getChildren:
case OpCode.getChildren2:
case OpCode.getData:
return false;
case OpCode.create:
case OpCode.create2:
case OpCode.createContainer:
case OpCode.error:
case OpCode.delete:
case OpCode.deleteContainer:
case OpCode.setACL:
case OpCode.setData:
case OpCode.check:
case OpCode.multi:
case OpCode.reconfig:
return true;
case OpCode.closeSession:
case OpCode.createSession:
return !this.isLocalSession;
default:
return false;
}
}
示例9: op2String
import org.apache.zookeeper.ZooDefs.OpCode; //导入方法依赖的package包/类
static String op2String(int op) {
switch (op) {
case OpCode.notification:
return "notification";
case OpCode.create:
return "create";
case OpCode.setWatches:
return "setWatches";
case OpCode.delete:
return "delete";
case OpCode.exists:
return "exists";
case OpCode.getData:
return "getData";
case OpCode.setData:
return "setData";
case OpCode.sync:
return "sync:";
case OpCode.getACL:
return "getACL";
case OpCode.setACL:
return "setACL";
case OpCode.getChildren:
return "getChildren";
case OpCode.getChildren2:
return "getChildren2";
case OpCode.ping:
return "ping";
case OpCode.createSession:
return "createSession";
case OpCode.closeSession:
return "closeSession";
case OpCode.error:
return "error";
default:
return "unknown " + op;
}
}
示例10: op2String
import org.apache.zookeeper.ZooDefs.OpCode; //导入方法依赖的package包/类
static String op2String(int op) {
switch (op) {
case OpCode.notification:
return "notification";
case OpCode.create:
return "create";
case OpCode.setWatches:
return "setWatches";
case OpCode.delete:
return "delete";
case OpCode.exists:
return "exists";
case OpCode.getData:
return "getData";
case OpCode.check:
return "check";
case OpCode.multi:
return "multi";
case OpCode.setData:
return "setData";
case OpCode.sync:
return "sync:";
case OpCode.getACL:
return "getACL";
case OpCode.setACL:
return "setACL";
case OpCode.getChildren:
return "getChildren";
case OpCode.getChildren2:
return "getChildren2";
case OpCode.ping:
return "ping";
case OpCode.createSession:
return "createSession";
case OpCode.closeSession:
return "closeSession";
case OpCode.error:
return "error";
default:
return "unknown " + op;
}
}
示例11: op2String
import org.apache.zookeeper.ZooDefs.OpCode; //导入方法依赖的package包/类
public static String op2String(int op) {
switch (op) {
case OpCode.notification:
return "notification";
case OpCode.create:
return "create";
case OpCode.create2:
return "create2";
case OpCode.createTTL:
return "createTtl";
case OpCode.createContainer:
return "createContainer";
case OpCode.delete:
return "delete";
case OpCode.deleteContainer:
return "deleteContainer";
case OpCode.exists:
return "exists";
case OpCode.getData:
return "getDate";
case OpCode.setData:
return "setData";
case OpCode.multi:
return "multi";
case OpCode.getACL:
return "getACL";
case OpCode.setACL:
return "setACL";
case OpCode.getChildren:
return "getChildren";
case OpCode.getChildren2:
return "getChildren2";
case OpCode.ping:
return "ping";
case OpCode.createSession:
return "createSession";
case OpCode.closeSession:
return "closeSession";
case OpCode.error:
return "error";
case OpCode.reconfig:
return "reconfig";
default:
return "unknown " + op;
}
}
示例12: op2String
import org.apache.zookeeper.ZooDefs.OpCode; //导入方法依赖的package包/类
static String op2String(int op) {
switch (op) {
case OpCode.notification:
return "notification";
case OpCode.create:
return "create";
case OpCode.create2:
return "create2";
case OpCode.createTTL:
return "createTtl";
case OpCode.createContainer:
return "createContainer";
case OpCode.setWatches:
return "setWatches";
case OpCode.delete:
return "delete";
case OpCode.deleteContainer:
return "deleteContainer";
case OpCode.exists:
return "exists";
case OpCode.getData:
return "getData";
case OpCode.check:
return "check";
case OpCode.multi:
return "multi";
case OpCode.setData:
return "setData";
case OpCode.sync:
return "sync:";
case OpCode.getACL:
return "getACL";
case OpCode.setACL:
return "setACL";
case OpCode.getChildren:
return "getChildren";
case OpCode.getChildren2:
return "getChildren2";
case OpCode.ping:
return "ping";
case OpCode.createSession:
return "createSession";
case OpCode.closeSession:
return "closeSession";
case OpCode.error:
return "error";
case OpCode.reconfig:
return "reconfig";
case OpCode.checkWatches:
return "checkWatches";
case OpCode.removeWatches:
return "removeWatches";
default:
return "unknown " + op;
}
}
示例13: op2String
import org.apache.zookeeper.ZooDefs.OpCode; //导入方法依赖的package包/类
public static String op2String(int op) {
switch (op) {
case OpCode.notification:
return "notification";
case OpCode.create:
return "create";
case OpCode.create2:
return "create2";
case OpCode.createContainer:
return "createContainer";
case OpCode.delete:
return "delete";
case OpCode.deleteContainer:
return "deleteContainer";
case OpCode.exists:
return "exists";
case OpCode.getData:
return "getDate";
case OpCode.setData:
return "setData";
case OpCode.multi:
return "multi";
case OpCode.getACL:
return "getACL";
case OpCode.setACL:
return "setACL";
case OpCode.getChildren:
return "getChildren";
case OpCode.getChildren2:
return "getChildren2";
case OpCode.ping:
return "ping";
case OpCode.createSession:
return "createSession";
case OpCode.closeSession:
return "closeSession";
case OpCode.error:
return "error";
case OpCode.reconfig:
return "reconfig";
default:
return "unknown " + op;
}
}
示例14: op2String
import org.apache.zookeeper.ZooDefs.OpCode; //导入方法依赖的package包/类
static String op2String(int op) {
switch (op) {
case OpCode.notification:
return "notification";
case OpCode.create:
return "create";
case OpCode.create2:
return "create2";
case OpCode.createContainer:
return "createContainer";
case OpCode.setWatches:
return "setWatches";
case OpCode.delete:
return "delete";
case OpCode.deleteContainer:
return "deleteContainer";
case OpCode.exists:
return "exists";
case OpCode.getData:
return "getData";
case OpCode.check:
return "check";
case OpCode.multi:
return "multi";
case OpCode.setData:
return "setData";
case OpCode.sync:
return "sync:";
case OpCode.getACL:
return "getACL";
case OpCode.setACL:
return "setACL";
case OpCode.getChildren:
return "getChildren";
case OpCode.getChildren2:
return "getChildren2";
case OpCode.ping:
return "ping";
case OpCode.createSession:
return "createSession";
case OpCode.closeSession:
return "closeSession";
case OpCode.error:
return "error";
case OpCode.reconfig:
return "reconfig";
case OpCode.checkWatches:
return "checkWatches";
case OpCode.removeWatches:
return "removeWatches";
default:
return "unknown " + op;
}
}