DataTree.copyStat(response.getStat(), stat);
DataTree.copyStat(response.getStat(), stat);
DataTree.copyStat(response.getStat(), stat);
DataTree.copyStat(response.getStat(), stat);
DataTree.copyStat(response.getStat(), stat);
DataTree.copyStat(response.getStat(), stat);
DataTree.copyStat(response.getStat(), stat);
DataTree.copyStat(response.getStat(), stat);
DataTree.copyStat(response.getStat(), stat);
@Override public void processResult(int rc, String path, Object ctx, byte[] bytes, Stat stat) { trace.commit(); if ( (responseStat != null) && (stat != null) ) { DataTree.copyStat(stat, responseStat); } CuratorEvent event = new CuratorEventImpl(client, CuratorEventType.RECONFIG, rc, path, null, ctx, stat, bytes, null, null, null, null); client.processBackgroundOperation(data, event); } };
public synchronized Stat setData(String path, byte[] data, int expectedVersion) throws KeeperException { ZNode node = isRootPath(path) ? root : root.findDescendant(stripRootFromPath(path)); node.setData(data, expectedVersion); Stat stat = new Stat(); DataTree.copyStat(node.getStat(), stat); return stat; }
public synchronized Stat exists(long sessionId, String path, Watcher watcher) throws KeeperException { try { ZNode node = isRootPath(path) ? root : root.findDescendant(stripRootFromPath(path)); if (watcher != null) { node.addWatcher(sessionId, watcher, WatchTriggerPolicy.WatchType.EXISTS); } Stat stat = new Stat(); DataTree.copyStat(node.getStat(), stat); return stat; } catch (KeeperException.NoNodeException e) { if (watcher != null) { // Set a watch for this node when it gets created if (!creationWatchers.containsKey(path)) { creationWatchers.put(path, new RetrieveableSet<ContextedWatcher>()); } ContextedWatcher contextedWatcher = new ContextedWatcher( watcher, sessionId, WatchTriggerPolicy.WatchType.EXISTS ); if (!creationWatchers.get(path).contains(contextedWatcher)) { creationWatchers.get(path).add(contextedWatcher); } } return null; } }
public synchronized byte[] getData(long sessionId, String path, Watcher watcher, Stat stat) throws KeeperException { ZNode node = isRootPath(path) ? root : root.findDescendant(stripRootFromPath(path)); if (watcher != null) { node.addWatcher(sessionId, watcher, WatchTriggerPolicy.WatchType.GETDATA); } if (stat != null) { DataTree.copyStat(node.getStat(), stat); } return node.getData(); }
@Override public void processResult(int rc, String path, Object ctx, byte[] data, Stat stat) { watching.commitWatcher(rc, false); trace.setReturnCode(rc).setResponseBytesLength(data).setPath(path).setWithWatcher(watching.hasWatcher()).setStat(stat).commit(); if ( (responseStat != null) && (stat != null) ) { DataTree.copyStat(stat, responseStat); } if ( decompress && (data != null) ) { try { data = client.getCompressionProvider().decompress(path, data); } catch ( Exception e ) { ThreadUtils.checkInterrupted(e); log.error("Decompressing for path: " + path, e); rc = KeeperException.Code.DATAINCONSISTENCY.intValue(); } } CuratorEvent event = new CuratorEventImpl(client, CuratorEventType.GET_DATA, rc, path, null, ctx, stat, data, null, null, null, null); client.processBackgroundOperation(operationAndData, event); } };
@Override public void processResult(int rc, String path, Object ctx, String name, Stat stat) { trace.setReturnCode(rc).setRequestBytesLength(data).setPath(path).commit(); if ( (stat != null) && (storingStat != null) ) { DataTree.copyStat(stat, storingStat); } if ( (rc == KeeperException.Code.NONODE.intValue()) && createParentsIfNeeded ) { backgroundCreateParentsThenNode(client, operationAndData, operationAndData.getData().getPath(), backgrounding, acling.getACLProviderForParents(), createParentsAsContainers); } else if ( (rc == KeeperException.Code.NODEEXISTS.intValue()) && setDataIfExists ) { backgroundSetData(client, operationAndData, operationAndData.getData().getPath(), backgrounding); } else { sendBackgroundResponse(rc, path, ctx, name, stat, operationAndData); } } };
@Override public AsyncStage<T> read(Stat storingStatIn) { return internalRead(n -> { if ( storingStatIn != null ) { DataTree.copyStat(n.stat(), storingStatIn); } return n.model(); }, this::exceptionally); }
DataTree.copyStat(znode.getStat(), stat);
DataTree.copyStat(znode.getStat(), stat);
clientPath); DataTree.copyStat(response.getStat(), stat); return response.getAcl();
DataTree.copyStat(response.getStat(), stat);