@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx) { SettableOperationFuture<String> result = (SettableOperationFuture<String>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK) { result.set(result.getRequestPath()); return; } // Otherwise, it is an error result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, String name) { SettableOperationFuture<String> result = (SettableOperationFuture<String>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK) { result.set((name == null || name.isEmpty()) ? path : name); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, String name) { SettableOperationFuture<String> result = (SettableOperationFuture<String>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK) { result.set((name == null || name.isEmpty()) ? path : name); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, String name) { SettableOperationFuture<String> result = (SettableOperationFuture<String>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK) { result.set((name == null || name.isEmpty()) ? path : name); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, Stat stat) { SettableOperationFuture<Stat> result = (SettableOperationFuture<Stat>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK) { result.set(stat); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, Stat stat) { SettableOperationFuture<Stat> result = (SettableOperationFuture<Stat>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK || code == KeeperException.Code.NONODE) { result.set(stat); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, Stat stat) { SettableOperationFuture<Stat> result = (SettableOperationFuture<Stat>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK) { result.set(stat); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, Stat stat) { SettableOperationFuture<Stat> result = (SettableOperationFuture<Stat>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK || code == KeeperException.Code.NONODE) { result.set(stat); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, Stat stat) { SettableOperationFuture<Stat> result = (SettableOperationFuture<Stat>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK) { result.set(stat); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, Stat stat) { SettableOperationFuture<Stat> result = (SettableOperationFuture<Stat>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK || code == KeeperException.Code.NONODE) { result.set(stat); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, List<String> children, Stat stat) { SettableOperationFuture<NodeChildren> result = (SettableOperationFuture<NodeChildren>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK) { result.set(new BasicNodeChildren(children, stat)); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, byte[] data, Stat stat) { SettableOperationFuture<NodeData> result = (SettableOperationFuture<NodeData>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK) { result.set(new BasicNodeData(data, stat)); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, List<String> children, Stat stat) { SettableOperationFuture<NodeChildren> result = (SettableOperationFuture<NodeChildren>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK) { result.set(new BasicNodeChildren(children, stat)); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, List<ACL> acl, Stat stat) { SettableOperationFuture<ACLData> result = (SettableOperationFuture<ACLData>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK) { result.set(new BasicACLData(acl, stat)); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, List<String> children, Stat stat) { SettableOperationFuture<NodeChildren> result = (SettableOperationFuture<NodeChildren>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK) { result.set(new BasicNodeChildren(children, stat)); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, byte[] data, Stat stat) { SettableOperationFuture<NodeData> result = (SettableOperationFuture<NodeData>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK) { result.set(new BasicNodeData(data, stat)); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, byte[] data, Stat stat) { SettableOperationFuture<NodeData> result = (SettableOperationFuture<NodeData>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK) { result.set(new BasicNodeData(data, stat)); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, List<ACL> acl, Stat stat) { SettableOperationFuture<ACLData> result = (SettableOperationFuture<ACLData>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK) { result.set(new BasicACLData(acl, stat)); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, List<ACL> acl, Stat stat) { SettableOperationFuture<ACLData> result = (SettableOperationFuture<ACLData>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK) { result.set(new BasicACLData(acl, stat)); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };
@Override @SuppressWarnings("unchecked") public void processResult(int rc, String path, Object ctx, List<ACL> acl, Stat stat) { SettableOperationFuture<ACLData> result = (SettableOperationFuture<ACLData>) ctx; KeeperException.Code code = KeeperException.Code.get(rc); if (code == KeeperException.Code.OK) { result.set(new BasicACLData(acl, stat)); return; } result.setException(KeeperException.create(code, result.getRequestPath())); } };