private void printStat(StatPersisted stat) { printHex("cZxid", stat.getCzxid()); System.out.println(" ctime = " + new Date(stat.getCtime()).toString()); printHex("mZxid", stat.getMzxid()); System.out.println(" mtime = " + new Date(stat.getMtime()).toString()); printHex("pZxid", stat.getPzxid()); System.out.println(" cversion = " + stat.getCversion()); System.out.println(" dataVersion = " + stat.getVersion()); System.out.println(" aclVersion = " + stat.getAversion()); printHex("ephemeralOwner", stat.getEphemeralOwner()); }
private void printStat(StatPersisted stat) { printHex("cZxid", stat.getCzxid()); System.out.println(" ctime = " + new Date(stat.getCtime()).toString()); printHex("mZxid", stat.getMzxid()); System.out.println(" mtime = " + new Date(stat.getMtime()).toString()); printHex("pZxid", stat.getPzxid()); System.out.println(" cversion = " + stat.getCversion()); System.out.println(" dataVersion = " + stat.getVersion()); System.out.println(" aclVersion = " + stat.getAversion()); printHex("ephemeralOwner", stat.getEphemeralOwner()); }
synchronized public void copyStat(Stat to) { to.setAversion(stat.getAversion()); to.setCtime(stat.getCtime()); to.setCzxid(stat.getCzxid()); to.setMtime(stat.getMtime()); to.setMzxid(stat.getMzxid()); to.setPzxid(stat.getPzxid()); to.setVersion(stat.getVersion()); to.setEphemeralOwner(getClientEphemeralOwner(stat)); to.setDataLength(data == null ? 0 : data.length); int numChildren = 0; if (this.children != null) { numChildren = children.size(); } // when we do the Cversion we need to translate from the count of the creates // to the count of the changes (v3 semantics) // for every create there is a delete except for the children still present to.setCversion(stat.getCversion()*2 - numChildren); to.setNumChildren(numChildren); }
static public void copyStatPersisted(StatPersisted from, StatPersisted to) { to.setAversion(from.getAversion()); to.setCtime(from.getCtime()); to.setCversion(from.getCversion()); to.setCzxid(from.getCzxid()); to.setMtime(from.getMtime()); to.setMzxid(from.getMzxid()); to.setPzxid(from.getPzxid()); to.setVersion(from.getVersion()); to.setEphemeralOwner(from.getEphemeralOwner()); }
synchronized public void copyStat(Stat to) { to.setAversion(stat.getAversion()); to.setCtime(stat.getCtime()); to.setCzxid(stat.getCzxid()); to.setMtime(stat.getMtime()); to.setMzxid(stat.getMzxid()); to.setPzxid(stat.getPzxid()); to.setVersion(stat.getVersion()); to.setEphemeralOwner(stat.getEphemeralOwner()); to.setDataLength(data == null ? 0 : data.length); int numChildren = 0; if (this.children != null) { numChildren = children.size(); } // when we do the Cversion we need to translate from the count of the creates // to the count of the changes (v3 semantics) // for every create there is a delete except for the children still present to.setCversion(stat.getCversion()*2 - numChildren); to.setNumChildren(numChildren); }
static public void copyStatPersisted(StatPersisted from, StatPersisted to) { to.setAversion(from.getAversion()); to.setCtime(from.getCtime()); to.setCversion(from.getCversion()); to.setCzxid(from.getCzxid()); to.setMtime(from.getMtime()); to.setMzxid(from.getMzxid()); to.setPzxid(from.getPzxid()); to.setVersion(from.getVersion()); to.setEphemeralOwner(from.getEphemeralOwner()); }
ChangeRecord nodeRecord = getRecordForPath(path); checkACL(zks, request.cnxn, parentRecord.acl, ZooDefs.Perms.DELETE, request.authInfo, path, null); checkAndIncVersion(nodeRecord.stat.getVersion(), deleteRequest.getVersion(), path); if (nodeRecord.childCount > 0) { throw new KeeperException.NotEmptyException(path); nodeRecord = getRecordForPath(path); checkACL(zks, request.cnxn, nodeRecord.acl, ZooDefs.Perms.WRITE, request.authInfo, path, null); int newVersion = checkAndIncVersion(nodeRecord.stat.getVersion(), setDataRequest.getVersion(), path); request.setTxn(new SetDataTxn(path, setDataRequest.getData(), newVersion)); nodeRecord = nodeRecord.duplicate(request.getHdr().getZxid()); nodeRecord = getRecordForPath(path); checkACL(zks, request.cnxn, nodeRecord.acl, ZooDefs.Perms.READ, request.authInfo, path, null); request.setTxn(new CheckVersionTxn(path, checkAndIncVersion(nodeRecord.stat.getVersion(), checkVersionRequest.getVersion(), path))); break;
request.authInfo); int version = deleteRequest.getVersion(); if (version != -1 && nodeRecord.stat.getVersion() != version) { throw new KeeperException.BadVersionException(path); request.authInfo); version = setDataRequest.getVersion(); int currentVersion = nodeRecord.stat.getVersion(); if (version != -1 && version != currentVersion) { throw new KeeperException.BadVersionException(path); request.authInfo); version = checkVersionRequest.getVersion(); currentVersion = nodeRecord.stat.getVersion(); if (version != -1 && version != currentVersion) { throw new KeeperException.BadVersionException(path);
sb.append("aversion").append(fieldDelim).append(head.stat.getAversion()).append(fieldSep); sb.append("cversion").append(fieldDelim).append(head.stat.getCversion()).append(fieldSep); sb.append("version").append(fieldDelim).append(head.stat.getVersion()).append(fieldSep); sb.append("data").append(fieldDelim).append(dataStr).append(fieldSep);
sb.append("aversion").append(fieldDelim).append(head.stat.getAversion()).append(fieldSep); sb.append("cversion").append(fieldDelim).append(head.stat.getCversion()).append(fieldSep); sb.append("version").append(fieldDelim).append(head.stat.getVersion()).append(fieldSep); sb.append("data").append(fieldDelim).append(dataStr).append(fieldSep);
synchronized public void copyStat(Stat to) { to.setAversion(stat.getAversion()); to.setCtime(stat.getCtime()); to.setCversion(stat.getCversion()); to.setCzxid(stat.getCzxid()); to.setMtime(stat.getMtime()); to.setMzxid(stat.getMzxid()); to.setPzxid(stat.getPzxid()); to.setVersion(stat.getVersion()); to.setEphemeralOwner(stat.getEphemeralOwner()); to.setDataLength(data == null ? 0 : data.length); if (this.children == null) { to.setNumChildren(0); } else { to.setNumChildren(children.size()); } }
static public void copyStatPersisted(StatPersisted from, StatPersisted to) { to.setAversion(from.getAversion()); to.setCtime(from.getCtime()); to.setCversion(from.getCversion()); to.setCzxid(from.getCzxid()); to.setMtime(from.getMtime()); to.setMzxid(from.getMzxid()); to.setPzxid(from.getPzxid()); to.setVersion(from.getVersion()); to.setEphemeralOwner(from.getEphemeralOwner()); }
request.authInfo); int version = deleteRequest.getVersion(); if (version != -1 && nodeRecord.stat.getVersion() != version) { throw new KeeperException.BadVersionException(path); request.authInfo); version = setDataRequest.getVersion(); int currentVersion = nodeRecord.stat.getVersion(); if (version != -1 && version != currentVersion) { throw new KeeperException.BadVersionException(path);