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 Digest
forReadResponse()
static Digest
forRepairedDataTracking()
static Digest
forSchema()
static Digest
forValidator()
long
inputBytes()
Digest
update(byte[] input, int offset, int len)
Digest
update(java.nio.ByteBuffer input)
Update the digest with the bytes from the supplied buffer.Digest
update(java.nio.ByteBuffer input, int pos, int len)
Update the digest with the bytes sliced from the supplied buffer.<V> Digest
update(V input, ValueAccessor<V> accessor)
Digest
updateWithBoolean(boolean val)
Digest
updateWithByte(int val)
<V> Digest
updateWithCounterContext(V context, ValueAccessor<V> accessor)
Update the digest with the content of a counter context.Digest
updateWithInt(int val)
Digest
updateWithLong(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()
-
-