Examples of SyncRequest


Examples of org.apache.zookeeper.proto.SyncRequest

       ByteBuffer bb = ByteBuffer.wrap(boas.toByteArray());
       Request readReq = new Request(null, 0x0, 0, OpCode.getData,
               bb, new ArrayList<Id>());

       boas.reset();
       SyncRequest syncReq = new SyncRequest("/testrace");
       syncReq.serialize(boa, "request");
       bb = ByteBuffer.wrap(boas.toByteArray());
       Request writeReq = new Request(null, 0x0, 0, OpCode.sync,
                                 bb, new ArrayList<Id>());

       processor.addToCommittedRequests(writeReq);
View Full Code Here

Examples of org.apache.zookeeper.proto.SyncRequest

                err = Code.get(rc.err);
                break;
            }
            case OpCode.sync: {
                lastOp = "SYNC";
                SyncRequest syncRequest = new SyncRequest();
                ByteBufferInputStream.byteBuffer2Record(request.request,
                        syncRequest);
                rsp = new SyncResponse(syncRequest.getPath());
                break;
            }
            case OpCode.check: {
                lastOp = "CHEC";
                rsp = new SetDataResponse(rc.stat);
View Full Code Here

Examples of org.apache.zookeeper_voltpatches.proto.SyncRequest

                err = Code.get(rc.err);
                break;
            }
            case OpCode.sync: {
                lastOp = "SYNC";
                SyncRequest syncRequest = new SyncRequest();
                ZooKeeperServer.byteBuffer2Record(request.request, syncRequest);
                rsp = new SyncResponse(syncRequest.getPath());
                break;
            }
            case OpCode.exists: {
                lastOp = "EXIS";
                // TODO we need to figure out the security requirement for this!
View Full Code Here

Examples of org.apache.zookeeper_voltpatches.proto.SyncRequest

        final String serverPath = prependChroot(clientPath);

        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.sync);
        SyncRequest request = new SyncRequest();
        SyncResponse response = new SyncResponse();
        request.setPath(serverPath);
        cnxn.queuePacket(h, new ReplyHeader(), request, response, cb,
                clientPath, serverPath, ctx, null);
    }
View Full Code Here

Examples of org.apache.zookeeper_voltpatches.proto.SyncRequest

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

Examples of org.apache.zookeeper_voltpatches.proto.SyncRequest

      return false;
    }
    if (peer_ == this) {
      return true;
    }
    SyncRequest peer = (SyncRequest) peer_;
    boolean ret = false;
    ret = path.equals(peer.path);
    if (!ret) return ret;
     return ret;
  }
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.