Package org.apache.zookeeper.proto

Examples of org.apache.zookeeper.proto.GetDataRequest.serialize()


        public void sendReadRequest() throws Exception {
            ByteArrayOutputStream boas = new ByteArrayOutputStream();
            BinaryOutputArchive boa = BinaryOutputArchive.getArchive(boas);
            GetDataRequest getDataRequest = new GetDataRequest(
                "/session" + Long.toHexString(sessionId) + "-" + nodeId, false);
            getDataRequest.serialize(boa, "request");
            ByteBuffer bb = ByteBuffer.wrap(boas.toByteArray());
            Request req = new Request(null, sessionId, ++cxid, OpCode.getData,
                                      bb, new ArrayList<Id>());
            zks.firstProcessor.processRequest(req);
        }
View Full Code Here


    throws Exception {

       ByteArrayOutputStream boas = new ByteArrayOutputStream();
       BinaryOutputArchive boa = BinaryOutputArchive.getArchive(boas);
       GetDataRequest getReq = new GetDataRequest("/testrace", false);
       getReq.serialize(boa, "request");
       ByteBuffer bb = ByteBuffer.wrap(boas.toByteArray());
       Request readReq = new Request(null, 0x0, 0, OpCode.getData,
               bb, new ArrayList<Id>());

       boas.reset();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.