Package org.apache.zookeeper.proto

Examples of org.apache.zookeeper.proto.RequestHeader


     */
    public byte[] getData(String path, Watcher watcher, Stat stat)
            throws KeeperException, InterruptedException {
        PathUtils.validatePath(path);

        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.getData);
        GetDataRequest request = new GetDataRequest();
        request.setPath(path);
        request.setWatch(watcher != null);
        GetDataResponse response = new GetDataResponse();
        WatchRegistration wcb = null;
View Full Code Here


     * @see #getData(String, Watcher, Stat)
     */
    public void getData(String path, Watcher watcher, DataCallback cb, Object ctx) {
        PathUtils.validatePath(path);

        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.getData);
        GetDataRequest request = new GetDataRequest();
        request.setPath(path);
        request.setWatch(watcher != null);
        GetDataResponse response = new GetDataResponse();
        WatchRegistration wcb = null;
View Full Code Here

     */
    public Stat setData(String path, byte data[], int version)
            throws KeeperException, InterruptedException {
        PathUtils.validatePath(path);

        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.setData);
        SetDataRequest request = new SetDataRequest();
        request.setPath(path);
        request.setData(data);
        request.setVersion(version);
        SetDataResponse response = new SetDataResponse();
View Full Code Here

     */
    public void setData(String path, byte data[], int version, StatCallback cb,
            Object ctx) {
        PathUtils.validatePath(path);

        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.setData);
        SetDataRequest request = new SetDataRequest();
        request.setPath(path);
        request.setData(data);
        request.setVersion(version);
        SetDataResponse response = new SetDataResponse();
View Full Code Here

     */
    public List<ACL> getACL(String path, Stat stat)
            throws KeeperException, InterruptedException {
        PathUtils.validatePath(path);

        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.getACL);
        GetACLRequest request = new GetACLRequest();
        request.setPath(path);
        GetACLResponse response = new GetACLResponse();
        ReplyHeader r = cnxn.submitRequest(h, request, response, null);
        if (r.getErr() != 0) {
View Full Code Here

     * @see #getACL(String, Stat)
     */
    public void getACL(String path, Stat stat, ACLCallback cb, Object ctx) {
        PathUtils.validatePath(path);

        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.getACL);
        GetACLRequest request = new GetACLRequest();
        request.setPath(path);
        GetACLResponse response = new GetACLResponse();
        cnxn
                .queuePacket(h, new ReplyHeader(), request, response, cb, path,
View Full Code Here

     */
    public Stat setACL(String path, List<ACL> acl, int version)
            throws KeeperException, InterruptedException {
        PathUtils.validatePath(path);

        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.setACL);
        SetACLRequest request = new SetACLRequest();
        request.setPath(path);
        if (acl != null && acl.size() == 0) {
            throw new KeeperException.InvalidACLException();
        }
View Full Code Here

     */
    public void setACL(String path, List<ACL> acl, int version,
            StatCallback cb, Object ctx) {
        PathUtils.validatePath(path);

        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.setACL);
        SetACLRequest request = new SetACLRequest();
        request.setPath(path);
        request.setAcl(acl);
        request.setVersion(version);
        SetACLResponse response = new SetACLResponse();
View Full Code Here

     */
    public List<String> getChildren(String path, Watcher watcher)
            throws KeeperException, InterruptedException {
        PathUtils.validatePath(path);

        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.getChildren);
        GetChildrenRequest request = new GetChildrenRequest();
        request.setPath(path);
        request.setWatch(watcher != null);
        GetChildrenResponse response = new GetChildrenResponse();
        WatchRegistration wcb = null;
View Full Code Here

     */
    public void getChildren(String path, Watcher watcher, ChildrenCallback cb,
            Object ctx) {
        PathUtils.validatePath(path);

        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.getChildren);
        GetChildrenRequest request = new GetChildrenRequest();
        request.setPath(path);
        request.setWatch(watcher != null);
        GetChildrenResponse response = new GetChildrenResponse();
        WatchRegistration wcb = null;
View Full Code Here

TOP

Related Classes of org.apache.zookeeper.proto.RequestHeader

Copyright © 2018 www.massapicom. 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.