|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sdnplatform.sync.internal.AbstractStoreClient<K,V>
public abstract class AbstractStoreClient<K,V>
| Constructor Summary | |
|---|---|
AbstractStoreClient()
|
|
| Method Summary | |
|---|---|
void |
delete(K key)
Delete the key by writing a null tombstone to the store obliterating any existing value stored for the key. |
void |
delete(K key,
IVersion version)
Delete the key by writing a null tombstone to the store using the provided IVersion. |
Versioned<V> |
get(K key)
Get the versioned value associated with the given 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. |
protected abstract java.util.List<IVersion> |
getVersions(K key)
Get the versions for a key |
IVersion |
put(K key,
V value)
Associated the given value to the key, clobbering any existing values stored for the key. |
boolean |
putIfNotObsolete(K key,
Versioned<V> versioned)
Put the versioned value to the key, ignoring any ObsoleteVersionException that may be thrown |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.sdnplatform.sync.IStoreClient |
|---|
addStoreListener, entries, get, put |
| Constructor Detail |
|---|
public AbstractStoreClient()
| Method Detail |
|---|
public V getValue(K key)
throws SyncException
IStoreClient
getValue in interface IStoreClient<K,V>key - The key
SyncException
public V getValue(K key,
V defaultValue)
throws SyncException
IStoreClient
getValue in interface IStoreClient<K,V>key - The key for which to fetch the associated valuedefaultValue - A value to return if there is no value associated
with this key
SyncException
protected abstract java.util.List<IVersion> getVersions(K key)
throws SyncException
key - the key
SyncException
public Versioned<V> get(K key)
throws SyncException
IStoreClientVersioned returned
can have a null value (i.e. can be null
if the key is not present.
get in interface IStoreClient<K,V>key - The key for which to fetch the value.
SyncException
public IVersion put(K key,
V value)
throws SyncException
IStoreClientIStoreClient.put(Object, Versioned)
or IStoreClient.putIfNotObsolete(Object, Versioned)
put in interface IStoreClient<K,V>key - The keyvalue - The value
ObsoleteVersionException
SyncException
public boolean putIfNotObsolete(K key,
Versioned<V> versioned)
throws SyncException
IStoreClient
putIfNotObsolete in interface IStoreClient<K,V>key - The keyversioned - The versioned value
SyncException
public void delete(K key)
throws SyncException
IStoreClientIStoreClient.delete(Object, IVersion)
should be used.
delete in interface IStoreClient<K,V>key - The key
SyncException
public void delete(K key,
IVersion version)
throws SyncException
IStoreClientIVersion.
delete in interface IStoreClient<K,V>key - The key to deleteversion - The version of the key
SyncException
ObsoleteVersionException - if the entry assoicated with the key
was locally modified by another thread after the get.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||