public enum HashAlgorithm extends Enum<HashAlgorithm>
| 枚举常量和说明 |
|---|
CRC32_HASH
CRC32_HASH as used by the perl API.
|
ELECTION_HASH |
ELF_HASH |
FNV1_32_HASH
32-bit FNV1.
|
FNV1_64_HASH
FNV hashes are designed to be fast while maintaining a low collision
rate.
|
FNV1A_32_HASH
32-bit FNV1a.
|
FNV1A_64_HASH
Variation of FNV.
|
KETAMA_HASH
MD5-based hash algorithm used by ketama.
|
LUA_HASH
From lua source,it is used for long key
|
MYSQL_HASH
From mysql source
|
NATIVE_HASH
Native hash (String.hashCode()).
|
ONE_AT_A_TIME
The Jenkins One-at-a-time hash ,please see
http://www.burtleburtle.net/bob/hash/doobs.html
|
RS_HASH |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
computeMd5(String k)
Get the md5 of the given key.
|
long |
hash(String k)
Compute the hash for the given key.
|
static HashAlgorithm |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static HashAlgorithm[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final HashAlgorithm NATIVE_HASH
public static final HashAlgorithm CRC32_HASH
public static final HashAlgorithm FNV1_64_HASH
http://www.isthe.com/chongo/tech/comp/fnv/,
http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hashpublic static final HashAlgorithm FNV1A_64_HASH
public static final HashAlgorithm FNV1_32_HASH
public static final HashAlgorithm FNV1A_32_HASH
public static final HashAlgorithm KETAMA_HASH
public static final HashAlgorithm MYSQL_HASH
public static final HashAlgorithm ELF_HASH
public static final HashAlgorithm RS_HASH
public static final HashAlgorithm LUA_HASH
public static final HashAlgorithm ELECTION_HASH
public static final HashAlgorithm ONE_AT_A_TIME
public static HashAlgorithm[] values()
for (HashAlgorithm c : HashAlgorithm.values()) System.out.println(c);
public static HashAlgorithm valueOf(String name)
name - 要返回的枚举常量的名称。public long hash(String k)
public static byte[] computeMd5(String k)
Copyright © 2013. All Rights Reserved.