use of org.apache.zookeeper_voltpatches.proto.ReplyHeader in project voltdb by VoltDB.
the class ZooKeeper method getChildren.
/**
* The Asynchronous version of getChildren. The request doesn't actually
* until the asynchronous callback is called.
*
* @see #getChildren(String, Watcher)
*/
public void getChildren(final String path, Watcher watcher, ChildrenCallback cb, Object ctx) {
verbotenThreadCheck();
final String clientPath = path;
PathUtils.validatePath(clientPath);
// the watch contains the un-chroot path
WatchRegistration wcb = null;
if (watcher != null) {
wcb = new ChildWatchRegistration(watcher, clientPath);
}
final String serverPath = prependChroot(clientPath);
RequestHeader h = new RequestHeader();
h.setType(ZooDefs.OpCode.getChildren);
GetChildrenRequest request = new GetChildrenRequest();
request.setPath(serverPath);
request.setWatch(watcher != null);
GetChildrenResponse response = new GetChildrenResponse();
cnxn.queuePacket(h, new ReplyHeader(), request, response, cb, clientPath, serverPath, ctx, wcb);
}
use of org.apache.zookeeper_voltpatches.proto.ReplyHeader in project voltdb by VoltDB.
the class ZooKeeper method setACL.
/**
* The Asynchronous version of setACL. The request doesn't actually until
* the asynchronous callback is called.
*
* @see #setACL(String, List, int)
*/
public void setACL(final String path, List<ACL> acl, int version, StatCallback cb, Object ctx) {
verbotenThreadCheck();
final String clientPath = path;
PathUtils.validatePath(clientPath);
final String serverPath = prependChroot(clientPath);
RequestHeader h = new RequestHeader();
h.setType(ZooDefs.OpCode.setACL);
SetACLRequest request = new SetACLRequest();
request.setPath(serverPath);
request.setAcl(acl);
request.setVersion(version);
SetACLResponse response = new SetACLResponse();
cnxn.queuePacket(h, new ReplyHeader(), request, response, cb, clientPath, serverPath, ctx, null);
}
use of org.apache.zookeeper_voltpatches.proto.ReplyHeader in project voltdb by VoltDB.
the class ZooKeeper method exists.
/**
* The Asynchronous version of exists. The request doesn't actually until
* the asynchronous callback is called.
*
* @see #exists(String, boolean)
*/
public void exists(final String path, Watcher watcher, StatCallback cb, Object ctx) {
verbotenThreadCheck();
final String clientPath = path;
PathUtils.validatePath(clientPath);
// the watch contains the un-chroot path
WatchRegistration wcb = null;
if (watcher != null) {
wcb = new ExistsWatchRegistration(watcher, clientPath);
}
final String serverPath = prependChroot(clientPath);
RequestHeader h = new RequestHeader();
h.setType(ZooDefs.OpCode.exists);
ExistsRequest request = new ExistsRequest();
request.setPath(serverPath);
request.setWatch(watcher != null);
SetDataResponse response = new SetDataResponse();
cnxn.queuePacket(h, new ReplyHeader(), request, response, cb, clientPath, serverPath, ctx, wcb);
}
use of org.apache.zookeeper_voltpatches.proto.ReplyHeader in project voltdb by VoltDB.
the class ZooKeeper method getACL.
/**
* The Asynchronous version of getACL. The request doesn't actually until
* the asynchronous callback is called.
*
* @see #getACL(String, Stat)
*/
public void getACL(final String path, Stat stat, ACLCallback cb, Object ctx) {
verbotenThreadCheck();
final String clientPath = path;
PathUtils.validatePath(clientPath);
final String serverPath = prependChroot(clientPath);
RequestHeader h = new RequestHeader();
h.setType(ZooDefs.OpCode.getACL);
GetACLRequest request = new GetACLRequest();
request.setPath(serverPath);
GetACLResponse response = new GetACLResponse();
cnxn.queuePacket(h, new ReplyHeader(), request, response, cb, clientPath, serverPath, ctx, null);
}
use of org.apache.zookeeper_voltpatches.proto.ReplyHeader in project voltdb by VoltDB.
the class ZooKeeper method setData.
/**
* The Asynchronous version of setData. The request doesn't actually until
* the asynchronous callback is called.
*
* @see #setData(String, byte[], int)
*/
public void setData(final String path, byte[] data, int version, StatCallback cb, Object ctx) {
verbotenThreadCheck();
final String clientPath = path;
PathUtils.validatePath(clientPath);
final String serverPath = prependChroot(clientPath);
RequestHeader h = new RequestHeader();
h.setType(ZooDefs.OpCode.setData);
SetDataRequest request = new SetDataRequest();
request.setPath(serverPath);
request.setData(data);
request.setVersion(version);
SetDataResponse response = new SetDataResponse();
cnxn.queuePacket(h, new ReplyHeader(), request, response, cb, clientPath, serverPath, ctx, null);
}
Aggregations