|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.spy.memcached.HashAlgorithmRegistry
public final class HashAlgorithmRegistry
Registry of known hashing algorithms for locating a server for a key. Useful when configuring from files using algorithm names.
Please, make sure you register your algorithm with {
registerHashAlgorithm(String, HashAlgorithm)
before referring to it
by name
Method Summary | |
---|---|
static HashAlgorithm |
lookupHashAlgorithm(java.lang.String name)
Tries to find selected hash algorithm using name provided. |
static void |
registerHashAlgorithm(java.lang.String name,
HashAlgorithm alg)
Registers provided HashAlgorithm instance with the given name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void registerHashAlgorithm(java.lang.String name, HashAlgorithm alg)
HashAlgorithm
instance with the given name. Name
is not case sensitive. Any registered algorithm with the same name will be
substituted
name
- name of the algorithmalg
- algorithm instance to registerpublic static HashAlgorithm lookupHashAlgorithm(java.lang.String name)
Note, that lookup is being performed using name's lower-case value
name
- the algorithm name to be used for lookup
HashAlgorithm
instance or null
if there's no
algorithm with the specified name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |