Example #1
0
File: Tools.java Project: goby/oce
 public static DistributedCacheSchema.ClusterInfo readClusterInfo(
     ZooKeeper zk, String name, boolean flag)
     throws KeeperException, InterruptedException, InvalidProtocolBufferException {
   if (flag && zk.exists("/" + name + "/info", true) == null) {
     return null;
   }
   byte[] data = zk.getData("/" + name + "/info", flag, null);
   return DistributedCacheSchema.ClusterInfo.parseFrom(data);
 }
Example #2
0
File: Tools.java Project: goby/oce
 public static DistributedCacheSchema.ClusterInfo readClusterInfo(ZooKeeper zk, String name)
     throws KeeperException, InterruptedException, InvalidProtocolBufferException {
   byte[] data = zk.getData("/" + name + "/info", false, null);
   return DistributedCacheSchema.ClusterInfo.parseFrom(data);
 }