private static final class Murmur3_128HashFunction.Murmur3_128Hasher extends AbstractStreamingHasher
Modifier and Type | Field and Description |
---|---|
private static long |
C1 |
private static long |
C2 |
private static int |
CHUNK_SIZE |
private long |
h1 |
private long |
h2 |
private int |
length |
Constructor and Description |
---|
Murmur3_128Hasher(int seed) |
Modifier and Type | Method and Description |
---|---|
private void |
bmix64(long k1,
long k2) |
private static long |
fmix64(long k) |
HashCode |
makeHash()
Computes a hash code based on the data that have been provided to this hasher.
|
private static long |
mixK1(long k1) |
private static long |
mixK2(long k2) |
protected void |
process(java.nio.ByteBuffer bb)
Processes the available bytes of the buffer (at most
chunk bytes). |
protected void |
processRemaining(java.nio.ByteBuffer bb)
This is invoked for the last bytes of the input, which are not enough to fill a whole chunk.
|
hash, putByte, putBytes, putBytes, putChar, putInt, putLong, putShort
putBoolean, putBytes, putDouble, putFloat, putObject, putString, putUnencodedChars
private static final int CHUNK_SIZE
private static final long C1
private static final long C2
private long h1
private long h2
private int length
protected void process(java.nio.ByteBuffer bb)
AbstractStreamingHasher
chunk
bytes).process
in class AbstractStreamingHasher
private void bmix64(long k1, long k2)
protected void processRemaining(java.nio.ByteBuffer bb)
AbstractStreamingHasher
ByteBuffer
is guaranteed to be non-empty.
This implementation simply pads with zeros and delegates to AbstractStreamingHasher.process(ByteBuffer)
.
processRemaining
in class AbstractStreamingHasher
public HashCode makeHash()
AbstractStreamingHasher
AbstractStreamingHasher.process(java.nio.ByteBuffer)
and any leftover bytes that did not make a
complete chunk are handled with AbstractStreamingHasher.processRemaining(java.nio.ByteBuffer)
.makeHash
in class AbstractStreamingHasher
private static long fmix64(long k)
private static long mixK1(long k1)
private static long mixK2(long k2)