Package com.google.common.hash
Class Murmur3_128HashFunction.Murmur3_128Hasher
- java.lang.Object
-
- com.google.common.hash.AbstractHasher
-
- com.google.common.hash.AbstractStreamingHashFunction.AbstractStreamingHasher
-
- com.google.common.hash.Murmur3_128HashFunction.Murmur3_128Hasher
-
- All Implemented Interfaces:
Hasher
,PrimitiveSink
- Enclosing class:
- Murmur3_128HashFunction
private static final class Murmur3_128HashFunction.Murmur3_128Hasher extends AbstractStreamingHashFunction.AbstractStreamingHasher
-
-
Constructor Summary
Constructors Constructor Description Murmur3_128Hasher(int seed)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
bmix64(long k1, long k2)
private static long
fmix64(long k)
HashCode
makeHash()
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 mostchunk
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.-
Methods inherited from class com.google.common.hash.AbstractStreamingHashFunction.AbstractStreamingHasher
hash, putByte, putBytes, putBytes, putChar, putInt, putLong, putObject, putShort, putUnencodedChars
-
Methods inherited from class com.google.common.hash.AbstractHasher
putBoolean, putDouble, putFloat, putString
-
-
-
-
Field Detail
-
CHUNK_SIZE
private static final int CHUNK_SIZE
- See Also:
- Constant Field Values
-
C1
private static final long C1
- See Also:
- Constant Field Values
-
C2
private static final long C2
- See Also:
- Constant Field Values
-
h1
private long h1
-
h2
private long h2
-
length
private int length
-
-
Method Detail
-
process
protected void process(java.nio.ByteBuffer bb)
Description copied from class:AbstractStreamingHashFunction.AbstractStreamingHasher
Processes the available bytes of the buffer (at mostchunk
bytes).- Specified by:
process
in classAbstractStreamingHashFunction.AbstractStreamingHasher
-
bmix64
private void bmix64(long k1, long k2)
-
processRemaining
protected void processRemaining(java.nio.ByteBuffer bb)
Description copied from class:AbstractStreamingHashFunction.AbstractStreamingHasher
This is invoked for the last bytes of the input, which are not enough to fill a whole chunk. The passedByteBuffer
is guaranteed to be non-empty.This implementation simply pads with zeros and delegates to
AbstractStreamingHashFunction.AbstractStreamingHasher.process(ByteBuffer)
.- Overrides:
processRemaining
in classAbstractStreamingHashFunction.AbstractStreamingHasher
-
makeHash
public HashCode makeHash()
- Specified by:
makeHash
in classAbstractStreamingHashFunction.AbstractStreamingHasher
-
fmix64
private static long fmix64(long k)
-
mixK1
private static long mixK1(long k1)
-
mixK2
private static long mixK2(long k2)
-
-