|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IStore<K,V>
The basic interface used for storage and storage decorators. Allows the usual crud operations. Note that certain operations rely on the correct implementation of equals and hashCode for the key. As such, arrays as keys should be avoided.
Method Summary | |
---|---|
void |
close()
Close the store. |
IClosableIterator<java.util.Map.Entry<K,java.util.List<Versioned<V>>>> |
entries()
Get an iterator over pairs of entries in the store. |
java.util.List<Versioned<V>> |
get(K key)
Get the value associated with the given key |
java.lang.String |
getName()
|
java.util.List<IVersion> |
getVersions(K key)
Get a list of the versions associated with the given key |
void |
put(K key,
Versioned<V> value)
Associate the value with the key and version in this store |
Method Detail |
---|
java.util.List<Versioned<V>> get(K key) throws SyncException
key
- The key to check for
SyncException
IClosableIterator<java.util.Map.Entry<K,java.util.List<Versioned<V>>>> entries()
void put(K key, Versioned<V> value) throws SyncException
key
- The key to usevalue
- The value to store and its version.
SyncException
java.util.List<IVersion> getVersions(K key) throws SyncException
key
- the key
IVersion
objects
SyncException
java.lang.String getName()
void close() throws SyncException
SyncException
- If closing fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |