Package org.apache.zookeeper.proto

Examples of org.apache.zookeeper.proto.ExistsRequest


        final String path = "/m1";

        RequestHeader h = new RequestHeader();
        h.setType(888)// This code does not exists
        ExistsRequest request = new ExistsRequest();
        request.setPath(path);
        request.setWatch(false);
        ExistsResponse response = new ExistsResponse();
        ReplyHeader r = zk.submitRequest(h, request, response, null);

        Assert.assertEquals(r.getErr(), Code.UNIMPLEMENTED.intValue());
View Full Code Here


                break;
            }
            case OpCode.exists: {
                lastOp = "EXIS";
                // TODO we need to figure out the security requirement for this!
                ExistsRequest existsRequest = new ExistsRequest();
                ByteBufferInputStream.byteBuffer2Record(request.request,
                        existsRequest);
                String path = existsRequest.getPath();
                if (path.indexOf('\0') != -1) {
                    throw new KeeperException.BadArgumentsException();
                }
                Stat stat = zks.getZKDatabase().statNode(path, existsRequest
                        .getWatch() ? cnxn : null);
                rsp = new ExistsResponse(stat);
                break;
            }
            case OpCode.getData: {
View Full Code Here

TOP

Related Classes of org.apache.zookeeper.proto.ExistsRequest

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.