|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DataStore<K,V>
A DataStore allows (#{Serializable} / #{Storable}) objects to be placed in the cache. The cache itself is created and configured using a #{DataStoreFactory}.
| Method Summary | |
|---|---|
void |
close()
Close this datastore. |
java.util.Collection |
find(DataStoreEntryEvaluator<K,V> evaluator)
Finds / Retrieves values that satisfy a criteria as dictated by the evaluator. |
V |
get(K k)
Returns the value to which the specified key is mapped in this cache. |
V |
get(K k,
java.lang.String cookie)
Returns the value to which the specified key is mapped in this cache. |
java.lang.String |
put(K k,
V v)
Creates or Replaces the object associated with key k. |
void |
remove(K k)
Removes the mapping between the key and the object. |
int |
removeIdleEntries(long idleFor)
Removes all entries that were not accessed for more than 'idlefor' millis |
java.lang.String |
touch(K k,
long version,
long timeStamp,
long ttl)
Updates the timestamp associated with this entry. |
void |
update(DataStoreEntryEvaluator<K,V> evaluator)
Updates all existing values associated with a key using the evaluator. |
java.lang.String |
updateDelta(K k,
V delta)
Performs an incremental update of the value associated with this key. |
| Method Detail |
|---|
java.lang.String put(K k,
V v)
throws DataStoreException
k - The Keyv - The value. The value must be either serializable of the DataStoreEntryHelper
that is associated with this cache must be able to transform this into a serializable.
DataStoreException
V get(K k)
throws DataStoreException
k - The key
DataStoreException
V get(K k,
java.lang.String cookie)
throws DataStoreException
k - The key
DataStoreException
void remove(K k)
throws DataStoreException
k - The key
DataStoreException
java.lang.String touch(K k,
long version,
long timeStamp,
long ttl)
throws DataStoreException
k - The key
DataStoreException
java.lang.String updateDelta(K k,
V delta)
throws DataStoreException
k - The keydelta - The object whose eval() method will be called.
DataStoreException#{DataStoreEntryEvaluator.eval}java.util.Collection find(DataStoreEntryEvaluator<K,V> evaluator)
evaluator - The StoreEntryEvaluator whose eval() method will be called.#{DataStoreEntryEvaluator.eval}void update(DataStoreEntryEvaluator<K,V> evaluator)
evaluator - The StoreEntryEvaluator whose eval() method will be called.#{DataStoreEntryEvaluator.eval}int removeIdleEntries(long idleFor)
idleFor - Time in milli secondsvoid close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||