Package org.apache.cassandra.db
Class Digest
- java.lang.Object
-
- org.apache.cassandra.db.Digest
-
public class Digest extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]digest()static DigestforReadResponse()static DigestforRepairedDataTracking()static DigestforSchema()static DigestforValidator()longinputBytes()Digestupdate(byte[] input, int offset, int len)Digestupdate(java.nio.ByteBuffer input)Update the digest with the bytes from the supplied buffer.Digestupdate(java.nio.ByteBuffer input, int pos, int len)Update the digest with the bytes sliced from the supplied buffer.<V> Digestupdate(V input, ValueAccessor<V> accessor)DigestupdateWithBoolean(boolean val)DigestupdateWithByte(int val)<V> DigestupdateWithCounterContext(V context, ValueAccessor<V> accessor)Update the digest with the content of a counter context.DigestupdateWithInt(int val)DigestupdateWithLong(long val)
-
-
-
Method Detail
-
forReadResponse
public static Digest forReadResponse()
-
forSchema
public static Digest forSchema()
-
forValidator
public static Digest forValidator()
-
forRepairedDataTracking
public static Digest forRepairedDataTracking()
-
update
public Digest update(byte[] input, int offset, int len)
-
update
public <V> Digest update(V input, ValueAccessor<V> accessor)
-
update
public Digest update(java.nio.ByteBuffer input)
Update the digest with the bytes from the supplied buffer. This does not modify the position of the supplied buffer, so callers are not required to duplicate() the source buffer before calling
-
update
public Digest update(java.nio.ByteBuffer input, int pos, int len)
Update the digest with the bytes sliced from the supplied buffer. This does not modify the position of the supplied buffer, so callers are not required to duplicate() the source buffer before calling
-
updateWithCounterContext
public <V> Digest updateWithCounterContext(V context, ValueAccessor<V> accessor)
Update the digest with the content of a counter context. Note that this skips the header entirely since the header information has local meaning only, while digests are meant for comparison across nodes. This means in particular that we always have: updateDigest(ctx) == updateDigest(clearAllLocal(ctx))
-
updateWithByte
public Digest updateWithByte(int val)
-
updateWithInt
public Digest updateWithInt(int val)
-
updateWithLong
public Digest updateWithLong(long val)
-
updateWithBoolean
public Digest updateWithBoolean(boolean val)
-
digest
public byte[] digest()
-
inputBytes
public long inputBytes()
-
-