Package org.apache.zookeeper_voltpatches.proto

Examples of org.apache.zookeeper_voltpatches.proto.GetChildrenRequest


                rsp = new GetACLResponse(acl, stat);
                break;
            }
            case OpCode.getChildren: {
                lastOp = "GETC";
                GetChildrenRequest getChildrenRequest = new GetChildrenRequest();
                ZooKeeperServer.byteBuffer2Record(request.request,
                        getChildrenRequest);
                DataNode n = getZKDatabase().getNode(
                        getChildrenRequest.getPath());
                if (n == null) {
                    throw new KeeperException.NoNodeException();
                }
                Long aclG;
                synchronized (n) {
                    aclG = n.acl;

                }
                checkACL(getZKDatabase().convertLong(aclG), ZooDefs.Perms.READ,
                        request.authInfo);
                List<String> children = getZKDatabase().getChildren(
                        getChildrenRequest.getPath(), null,
                        getChildrenRequest.getWatch() ? cnxn : null);
                rsp = new GetChildrenResponse(children);
                break;
            }
            case OpCode.getChildren2: {
                lastOp = "GETC";
View Full Code Here


  }
  public int compareTo (Object peer_) throws ClassCastException {
    if (!(peer_ instanceof GetChildrenRequest)) {
      throw new ClassCastException("Comparing different types of records.");
    }
    GetChildrenRequest peer = (GetChildrenRequest) peer_;
    int ret = 0;
    ret = path.compareTo(peer.path);
    if (ret != 0) return ret;
    ret = (watch == peer.watch)? 0 : (watch?1:-1);
    if (ret != 0) return ret;
View Full Code Here

      return false;
    }
    if (peer_ == this) {
      return true;
    }
    GetChildrenRequest peer = (GetChildrenRequest) peer_;
    boolean ret = false;
    ret = path.equals(peer.path);
    if (!ret) return ret;
    ret = (watch==peer.watch);
    if (!ret) return ret;
View Full Code Here

        final String serverPath = prependChroot(clientPath);

        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.getChildren);
        GetChildrenRequest request = new GetChildrenRequest();
        request.setPath(serverPath);
        request.setWatch(watcher != null);
        GetChildrenResponse response = new GetChildrenResponse();
        ReplyHeader r = cnxn.submitRequest(h, request, response, wcb);
        if (r.getErr() != 0) {
            throw KeeperException.create(KeeperException.Code.get(r.getErr()),
                    clientPath);
View Full Code Here

        final String serverPath = prependChroot(clientPath);

        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.getChildren);
        GetChildrenRequest request = new GetChildrenRequest();
        request.setPath(serverPath);
        request.setWatch(watcher != null);
        GetChildrenResponse response = new GetChildrenResponse();
        cnxn.queuePacket(h, new ReplyHeader(), request, response, cb,
                clientPath, serverPath, ctx, wcb);
    }
View Full Code Here

TOP

Related Classes of org.apache.zookeeper_voltpatches.proto.GetChildrenRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.