|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.shoal.ha.cache.impl.store.ReplicatedDataStore<K,V>
public class ReplicatedDataStore<K,V extends java.io.Serializable>
| Constructor Summary | |
|---|---|
ReplicatedDataStore(DataStoreContext<K,V> conf,
GroupService gs)
|
|
| Method Summary | |
|---|---|
void |
close()
Close this datastore. |
void |
destroy()
|
V |
get(K key)
Returns the value to which the specified key is mapped in this cache. |
DataStoreContext<K,V> |
getDataStoreContext()
|
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 |
int |
size()
|
java.lang.String |
touch(K k,
long version,
long ts,
long ttl)
Updates the timestamp associated with this entry. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReplicatedDataStore(DataStoreContext<K,V> conf,
GroupService gs)
| Method Detail |
|---|
public DataStoreContext<K,V> getDataStoreContext()
public java.lang.String put(K k,
V v)
throws DataStoreException
DataStore
put in interface DataStore<K,V extends java.io.Serializable>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
public V get(K key)
throws DataStoreException
DataStore
get in interface DataStore<K,V extends java.io.Serializable>key - The key
DataStoreException
public void remove(K k)
throws DataStoreException
DataStore
remove in interface DataStore<K,V extends java.io.Serializable>k - The key
DataStoreException
public java.lang.String touch(K k,
long version,
long ts,
long ttl)
throws DataStoreException
DataStore
touch in interface DataStore<K,V extends java.io.Serializable>k - The key
DataStoreExceptionpublic int removeIdleEntries(long idleFor)
DataStore
removeIdleEntries in interface DataStore<K,V extends java.io.Serializable>idleFor - Time in milli secondspublic void close()
DataStore
close in interface DataStore<K,V extends java.io.Serializable>public void destroy()
destroy in interface DataStore<K,V extends java.io.Serializable>public int size()
size in interface DataStore<K,V extends java.io.Serializable>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||