public class ConsistentHashStore<T> extends Object
| Constructor and Description |
|---|
ConsistentHashStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T value)
Add the value such as a server name
|
void |
clear()
Clear all values and keys
|
T |
get(byte[] key)
Get the value corresponding to the given key
|
T |
get(ByteBuffer key)
Get the value corresponding to the given key
|
T |
get(String key)
Get the value corresponding to the given key
|
boolean |
hasValue(T value)
Check if this store has
value |
void |
remove(T value)
Remove the value which already added by
add(T) |
public void add(T value)
value - value to be addedpublic void remove(T value)
add(T)value - value to be removed in this storepublic boolean hasValue(T value)
valuevalue - value to be checkedvaluepublic void clear()
public T get(String key)
key - String keykeypublic T get(byte[] key)
key - byte array keykeypublic T get(ByteBuffer key)
key - ByteBuffer keykeyCopyright © 2015 Project Grizzly. All Rights Reserved.