@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())); } };