rsp = new ExistsResponse(stat);
break;
}
case OpCode.getData: {
lastOp = "GETD";
GetDataRequest getDataRequest = new GetDataRequest();
ZooKeeperServer.byteBuffer2Record(request.request,
getDataRequest);
DataNode n = getZKDatabase().getNode(getDataRequest.getPath());
if (n == null) {
throw new KeeperException.NoNodeException();
}
Long aclL;
synchronized (n) {
aclL = n.acl;
}
checkACL(getZKDatabase().convertLong(aclL), ZooDefs.Perms.READ,
request.authInfo);
Stat stat = new Stat();
byte b[] = getZKDatabase().getData(getDataRequest.getPath(),
stat, getDataRequest.getWatch() ? cnxn : null);
rsp = new GetDataResponse(b, stat);
break;
}
case OpCode.setWatches: {
lastOp = "SETW";