public interface IDistributedKVStoreService
Modifier and Type | Method and Description |
---|---|
IFuture<IID> |
add(java.lang.String key,
java.lang.Object value)
Add a key/value pair to the collection addressed by the given key.
|
IFuture<java.util.Set<java.lang.String>> |
getLocalKeySet()
Returns all keys stored in this node.
|
boolean |
isInitialized()
Gets the initialized flag.
|
IFuture<?> |
lookup(java.lang.String key)
Lookup a key in the ring and return the saved value, if any.
|
IFuture<?> |
lookup(java.lang.String key,
IID idHash)
Lookup a key in the ring and return the saved value, if any.
|
IFuture<IID> |
lookupResponsibleStore(java.lang.String key)
Lookup a key and return the responsible Node ID.
|
IFuture<java.util.Collection<StoreEntry>> |
pullEntries(IID targetNodeId)
Returns all entries that belong to the given node Id
and deletes them on this node.
|
IFuture<java.lang.Void> |
pushEntries(java.util.Collection<StoreEntry> entries)
Receive entries from another node and insert them in the local store
or in the store of a predecessor, if key is matching.
|
IFuture<IID> |
put(java.lang.String key,
java.lang.Object value)
Publish a key/value pair in the corresponding node.
|
void |
setInitialized(boolean b)
Sets the initialized flag.
|
void |
setRingService(IRingApplicationService ring)
Set the local ringNode.
|
IFuture<IID> put(java.lang.String key, java.lang.Object value)
key
- The Key.value
- The Value.IFuture<IID> add(java.lang.String key, java.lang.Object value)
key
- The Key.value
- The Value to add.IFuture<IID> lookupResponsibleStore(java.lang.String key)
key
- Requested key.IFuture<?> lookup(java.lang.String key)
key
- Requested key.IFuture<?> lookup(java.lang.String key, IID idHash)
key
- Requested key.idHash
- The hashed key to find the corresponding node.void setRingService(IRingApplicationService ring)
ring
- the new ringNodeIFuture<java.util.Set<java.lang.String>> getLocalKeySet()
IFuture<java.util.Collection<StoreEntry>> pullEntries(IID targetNodeId)
targetNodeId
- IFuture<java.lang.Void> pushEntries(java.util.Collection<StoreEntry> entries)
entries
- the entriesvoid setInitialized(boolean b)
boolean isInitialized()