|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
K - The type of the key being storedV - The type of the value being storedpublic interface StoreClient<K,V>
The user-facing interface to a Voldemort store. Gives basic put/get/delete plus helper functions.
| Method Summary | |
|---|---|
boolean |
applyUpdate(UpdateAction<K,V> action)
Apply the given action repeatedly until no ObsoleteVersionException is thrown. |
boolean |
applyUpdate(UpdateAction<K,V> action,
int maxTries)
Apply the given action repeatedly until no ObsoleteVersionException is thrown or maxTries unsuccessful attempts have been made. |
boolean |
delete(K key)
Delete any version of the given key which equal to or less than the current versions |
boolean |
delete(K key,
Version version)
Delete the specified version and any prior versions of the given key |
Versioned<V> |
get(K key)
Get the versioned value associated with the given key or null if no value is associated with the key. |
Versioned<V> |
get(K key,
Versioned<V> defaultValue)
Get the versioned value associated with the given key or the defaultValue if no value is associated with the key. |
java.util.Map<K,Versioned<V>> |
getAll(java.lang.Iterable<K> keys)
Gets the versioned values associated with the given keys and returns them in a Map of keys to versioned values. |
java.util.List<Node> |
getResponsibleNodes(K key)
Returns the list of nodes which should have this key. |
V |
getValue(K key)
Get the value associated with the given key or null if there is no value associated with this key. |
V |
getValue(K key,
V defaultValue)
Get the value associated with the given key or defaultValue if there is no value associated with the key. |
void |
put(K key,
V value)
Associated the given value to the key, clobbering any existing values stored for the key. |
void |
put(K key,
Versioned<V> versioned)
Put the given Versioned value into the store for the given key if the version is greater to or concurrent with existing values. |
boolean |
putIfNotObsolete(K key,
Versioned<V> versioned)
Put the versioned value to the key, ignoring any ObsoleteVersionException that may be thrown |
| Method Detail |
|---|
V getValue(K key)
key - The key
V getValue(K key,
V defaultValue)
key - The key for which to fetch the associated valuedefaultValue - A value to return if there is no value associated
with this key
Versioned<V> get(K key)
key - The key for which to fetch the value.
java.util.Map<K,Versioned<V>> getAll(java.lang.Iterable<K> keys)
keys - The keys for which to fetch the values.
Versioned<V> get(K key,
Versioned<V> defaultValue)
key - The key for which to fetch the value.
void put(K key,
V value)
key - The keyvalue - The value
void put(K key,
Versioned<V> versioned)
throws ObsoleteVersionException
key - The keyversioned - The value and its versioned
ObsoleteVersionException
boolean putIfNotObsolete(K key,
Versioned<V> versioned)
key - The keyversioned - The versioned value
boolean applyUpdate(UpdateAction<K,V> action)
action - The action to apply. This is meant as a callback for the
user to extend to provide their own logic.
boolean applyUpdate(UpdateAction<K,V> action,
int maxTries)
action - The action to apply
boolean delete(K key)
key - The key
boolean delete(K key,
Version version)
key - The key to deleteversion - The version of the key
java.util.List<Node> getResponsibleNodes(K key)
key -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||