/** * async update */ @Override public boolean[] updateChildren(List<String> paths, List<DataUpdater<T>> updaters, int options) { List<T> updateData = update(paths, updaters, null, null, options); boolean[] success = new boolean[paths.size()]; // init to false for (int i = 0; i < paths.size(); i++) { T data = updateData.get(i); success[i] = (data != null); } return success; }
new ArrayList<List<String>>(Collections.<List<String>> nCopies(size, null)); List<T> updateData = _baseAccessor.update(serverPaths, updaters, pathsCreatedList, setStats, options);
new ArrayList<List<String>>(Collections.<List<String>>nCopies(size, null)); List<T> updateData = _baseAccessor.update(serverPaths, updaters, pathsCreatedList, setStats, options);
/** * async update */ @Override public boolean[] updateChildren(List<String> paths, List<DataUpdater<T>> updaters, int options) { List<T> updateData = update(paths, updaters, null, null, options); boolean[] success = new boolean[paths.size()]; // init to false for (int i = 0; i < paths.size(); i++) { T data = updateData.get(i); success[i] = (data != null); } return success; }
accessor.update(updatePaths, updaters, pathsCreated, null, AccessOption.PERSISTENT); for (int i = 0; i < updatePaths.size(); i++) { success[i] = updateRecords.get(i) != null;
ZkBaseDataAccessor<ZNRecord> accessor = new ZkBaseDataAccessor<ZNRecord>(_gZkClient); boolean success = accessor.update(path, new ZNRecordUpdater(record), AccessOption.PERSISTENT); Assert.assertTrue(success); ZNRecord getRecord = _gZkClient.readData(path); success = accessor.update(path, new ZNRecordUpdater(record), AccessOption.PERSISTENT); Assert.assertTrue(success); getRecord = _gZkClient.readData(path); success = accessor.update(path, new DataUpdater<ZNRecord>() {
success = accessor.update(path, new ZNRecordUpdater(newRecord), AccessOption.PERSISTENT); Assert.assertTrue(success);