|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.infinispan.util.hash.MurmurHash3
public class MurmurHash3
MurmurHash3 implementation in Java, based on Austin Appleby's original in C Only implementing x64 version, because this should always be faster on 64 bit native processors, even 64 bit being ran with a 32 bit OS; this should also be as fast or faster than the x86 version on some modern 32 bit processors.
| Constructor Summary | |
|---|---|
MurmurHash3()
|
|
| Method Summary | |
|---|---|
int |
hash(byte[] payload)
Hashes a byte array efficiently. |
int |
hash(int hashcode)
An incremental version of the hash function, that spreads a pre-calculated hash code, such as one derived from Object.hashCode(). |
int |
hash(long[] payload)
Hashes a byte array efficiently. |
int |
hash(Object o)
A helper that calculates the hashcode of an object, choosing the optimal mechanism of hash calculation after considering the type of the object (byte array, String or Object). |
static long[] |
MurmurHash3_x64_128(byte[] key,
int seed)
Hash a value using the x64 128 bit variant of MurmurHash3 |
static long[] |
MurmurHash3_x64_128(long[] key,
int seed)
Hash a value using the x64 128 bit variant of MurmurHash3 |
static int |
MurmurHash3_x64_32(byte[] key,
int seed)
Hash a value using the x64 32 bit variant of MurmurHash3 |
static int |
MurmurHash3_x64_32(long[] key,
int seed)
Hash a value using the x64 32 bit variant of MurmurHash3 |
static long |
MurmurHash3_x64_64(byte[] key,
int seed)
Hash a value using the x64 64 bit variant of MurmurHash3 |
static long |
MurmurHash3_x64_64(long[] key,
int seed)
Hash a value using the x64 64 bit variant of MurmurHash3 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MurmurHash3()
| Method Detail |
|---|
public static long[] MurmurHash3_x64_128(byte[] key,
int seed)
key - value to hashseed - random value
public static long MurmurHash3_x64_64(byte[] key,
int seed)
key - value to hashseed - random value
public static int MurmurHash3_x64_32(byte[] key,
int seed)
key - value to hashseed - random value
public static long[] MurmurHash3_x64_128(long[] key,
int seed)
key - value to hashseed - random value
public static long MurmurHash3_x64_64(long[] key,
int seed)
key - value to hashseed - random value
public static int MurmurHash3_x64_32(long[] key,
int seed)
key - value to hashseed - random value
public int hash(byte[] payload)
Hash
hash in interface Hashpayload - a byte array to hash
public int hash(long[] payload)
payload - a byte array to hash
public int hash(int hashcode)
HashObject.hashCode().
hash in interface Hashhashcode - an object's hashcode
public int hash(Object o)
Hash
hash in interface Hasho - object to hash
|
--> | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||