public interface DataStore<K,V>
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this datastore.
|
void |
destroy() |
V |
get(K k)
Returns the value to which the specified key is mapped in this cache.
|
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
|
int |
size() |
String |
touch(K k,
long version,
long timeStamp,
long ttl)
Updates the timestamp associated with this entry.
|
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.DataStoreExceptionV get(K k) throws DataStoreException
k - The keyDataStoreExceptionvoid remove(K k) throws DataStoreException
k - The keyDataStoreExceptionString touch(K k, long version, long timeStamp, long ttl) throws DataStoreException
k - The keyDataStoreExceptionint removeIdleEntries(long idleFor)
idleFor - Time in milli secondsvoid close()
void destroy()
int size()
Copyright © 2017–2019 Eclipse Foundation. All rights reserved.