public void readFields(java.io.DataInput in) throws java.io.IOException { BinaryInputArchive archive = new BinaryInputArchive(in); deserialize(archive, ""); } public int compareTo (Object peer_) throws ClassCastException {
public void write(java.io.DataOutput out) throws java.io.IOException { BinaryOutputArchive archive = new BinaryOutputArchive(out); serialize(archive, ""); } public void readFields(java.io.DataInput in) throws java.io.IOException {
Create2Response cr2 = new Create2Response(); cr2.deserialize(archive, tag); results.add(new OpResult.CreateResult(cr2.getPath(), cr2.getStat())); break;
Create2Response response = new Create2Response(); Record record = makeCreateRecord(createMode, serverPath, data, acl, ttl); ReplyHeader r = cnxn.submitRequest(h, record, response, null); DataTree.copyStat(response.getStat(), stat); return response.getPath(); } else { return response.getPath().substring(cnxn.chrootPath.length());
case ZooDefs.OpCode.create2: OpResult.CreateResult createResult = (OpResult.CreateResult) result; new Create2Response(createResult.getPath(), createResult.getStat()).serialize(archive, tag); break; case ZooDefs.OpCode.delete:
/** * The asynchronous version of create with ttl. * * @see #create(String, byte[], List, CreateMode, Stat, long) */ public void create(final String path, byte data[], List<ACL> acl, CreateMode createMode, Create2Callback cb, Object ctx, long ttl) { final String clientPath = path; PathUtils.validatePath(clientPath, createMode.isSequential()); EphemeralType.validateTTL(createMode, ttl); final String serverPath = prependChroot(clientPath); RequestHeader h = new RequestHeader(); setCreateHeader(createMode, h); ReplyHeader r = new ReplyHeader(); Create2Response response = new Create2Response(); Record record = makeCreateRecord(createMode, serverPath, data, acl, ttl); cnxn.queuePacket(h, r, record, response, cb, clientPath, serverPath, ctx, null); }
case OpCode.createContainer: { lastOp = "CREA"; rsp = new Create2Response(rc.path, rc.stat); err = Code.get(rc.err); break;