public void digest(MessageDigest digest) { // localDeletionTime is basically a metadata of the deletion time that tells us when it's ok to purge it. // It's thus intrinsically a local information and shouldn't be part of the digest (which exists for // cross-nodes comparisons). FBUtilities.updateWithLong(digest, markedForDeleteAt()); }
public void digest(MessageDigest digest) { // localDeletionTime is basically a metadata of the deletion time that tells us when it's ok to purge it. // It's thus intrinsically a local information and shouldn't be part of the digest (which exists for // cross-nodes comparisons). FBUtilities.updateWithLong(digest, markedForDeleteAt()); }
/** * Adds this liveness information to the provided digest. * * @param digest the digest to add this liveness information to. */ public void digest(MessageDigest digest) { FBUtilities.updateWithLong(digest, timestamp()); }
public void digest(MessageDigest digest) { // localDeletionTime is basically a metadata of the deletion time that tells us when it's ok to purge it. // It's thus intrinsically a local information and shouldn't be part of the digest (which exists for // cross-nodes comparisons). FBUtilities.updateWithLong(digest, markedForDeleteAt()); }
/** * Adds this liveness information to the provided digest. * * @param digest the digest to add this liveness information to. */ public void digest(MessageDigest digest) { FBUtilities.updateWithLong(digest, timestamp()); }
/** * Adds this liveness information to the provided digest. * * @param digest the digest to add this liveness information to. */ public void digest(MessageDigest digest) { FBUtilities.updateWithLong(digest, timestamp()); }
/** * Adds this liveness information to the provided digest. * * @param digest the digest to add this liveness information to. */ public void digest(MessageDigest digest) { FBUtilities.updateWithLong(digest, timestamp()); }
public void digest(MessageDigest digest) { // localDeletionTime is basically a metadata of the deletion time that tells us when it's ok to purge it. // It's thus intrinsically a local information and shouldn't be part of the digest (which exists for // cross-nodes comparisons). FBUtilities.updateWithLong(digest, markedForDeleteAt()); }
private static byte[] hash(Collection<InetAddress> data) { try { // Identify the host. MessageDigest messageDigest = MessageDigest.getInstance("MD5"); for(InetAddress addr : data) messageDigest.update(addr.getAddress()); // Identify the process on the load: we use both the PID and class loader hash. long pid = NativeLibrary.getProcessID(); if (pid < 0) pid = new Random(System.currentTimeMillis()).nextLong(); FBUtilities.updateWithLong(messageDigest, pid); ClassLoader loader = UUIDGen.class.getClassLoader(); int loaderId = loader != null ? System.identityHashCode(loader) : 0; FBUtilities.updateWithInt(messageDigest, loaderId); return messageDigest.digest(); } catch (NoSuchAlgorithmException nsae) { throw new RuntimeException("MD5 digest algorithm is not available", nsae); } } }
private static byte[] hash(Collection<InetAddress> data) { try { // Identify the host. MessageDigest messageDigest = MessageDigest.getInstance("MD5"); for(InetAddress addr : data) messageDigest.update(addr.getAddress()); // Identify the process on the load: we use both the PID and class loader hash. long pid = NativeLibrary.getProcessID(); if (pid < 0) pid = new Random(System.currentTimeMillis()).nextLong(); FBUtilities.updateWithLong(messageDigest, pid); ClassLoader loader = UUIDGen.class.getClassLoader(); int loaderId = loader != null ? System.identityHashCode(loader) : 0; FBUtilities.updateWithInt(messageDigest, loaderId); return messageDigest.digest(); } catch (NoSuchAlgorithmException nsae) { throw new RuntimeException("MD5 digest algorithm is not available", nsae); } } }
@Override public void updateDigest(MessageDigest digest) { digest.update(name().toByteBuffer().duplicate()); // We don't take the deltas into account in a digest contextManager.updateDigest(digest, value()); FBUtilities.updateWithLong(digest, timestamp); FBUtilities.updateWithByte(digest, serializationFlags()); FBUtilities.updateWithLong(digest, timestampOfLastDelete); }
public void updateDigest(MessageDigest digest) { digest.update(name().toByteBuffer().duplicate()); digest.update(value().duplicate()); FBUtilities.updateWithLong(digest, timestamp()); FBUtilities.updateWithByte(digest, serializationFlags()); }
@Override public void updateDigest(MessageDigest digest) { digest.update(name().toByteBuffer().duplicate()); FBUtilities.updateWithLong(digest, timestamp()); FBUtilities.updateWithByte(digest, serializationFlags()); } }
@Override public void updateDigest(MessageDigest digest) { updateWithName(digest); // We don't take the deltas into account in a digest contextManager.updateDigest(digest, value()); FBUtilities.updateWithLong(digest, timestamp()); FBUtilities.updateWithByte(digest, serializationFlags()); FBUtilities.updateWithLong(digest, timestampOfLastDelete()); }
@Override public void updateDigest(MessageDigest digest) { updateWithName(digest); FBUtilities.updateWithLong(digest, timestamp()); FBUtilities.updateWithByte(digest, serializationFlags()); }
public void digest(MessageDigest digest) { digest.update(value().duplicate()); FBUtilities.updateWithLong(digest, timestamp()); FBUtilities.updateWithInt(digest, ttl()); FBUtilities.updateWithBoolean(digest, isCounterCell()); if (path() != null) path().digest(digest); }
@Override public void updateDigest(MessageDigest digest) { updateWithName(digest); // name updateWithValue(digest); // value FBUtilities.updateWithLong(digest, timestamp()); FBUtilities.updateWithByte(digest, serializationFlags()); }
public void digest(MessageDigest digest) { if (isCounterCell()) { CounterContext.instance().updateDigest(digest, value()); } else { digest.update(value().duplicate()); } FBUtilities.updateWithLong(digest, timestamp()); FBUtilities.updateWithInt(digest, ttl()); FBUtilities.updateWithBoolean(digest, isCounterCell()); if (path() != null) path().digest(digest); }
public void digest(MessageDigest digest) { if (isCounterCell()) { CounterContext.instance().updateDigest(digest, value()); } else { digest.update(value().duplicate()); } FBUtilities.updateWithLong(digest, timestamp()); FBUtilities.updateWithInt(digest, ttl()); FBUtilities.updateWithBoolean(digest, isCounterCell()); if (path() != null) path().digest(digest); }
public void digest(MessageDigest digest) { if (isCounterCell()) { CounterContext.instance().updateDigest(digest, value()); } else { digest.update(value().duplicate()); } FBUtilities.updateWithLong(digest, timestamp()); FBUtilities.updateWithInt(digest, ttl()); FBUtilities.updateWithBoolean(digest, isCounterCell()); if (path() != null) path().digest(digest); }