public class InMemoryKeyValueClient extends Object implements KeyValueClient
| Modifier | Constructor and Description |
|---|---|
|
InMemoryKeyValueClient() |
protected |
InMemoryKeyValueClient(Map<String,Data<byte[]>> map) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Awaitable |
deleteValue(String key)
Deletes the value associated with the given key.
|
Data<byte[]> |
getValue(String key)
Returns the
Data object associated with the given key. |
Awaitable |
putValue(String key,
Data<byte[]> value)
Adds or replaces the given value in the key value store.
|
public Awaitable putValue(String key, Data<byte[]> value)
KeyValueClientputValue in interface KeyValueClientkey - The key associated with this valuevalue - The value to storepublic Data<byte[]> getValue(String key)
KeyValueClientData object associated with the given key. Returns null if there is no
associated value.getValue in interface KeyValueClientkey - The key associated with the valuepublic Awaitable deleteValue(String key)
KeyValueClientdeleteValue in interface KeyValueClientkey - The key associated with this valuepublic void close()
close in interface KeyValueClientclose in interface AutoCloseableCopyright © 2019 Flux Capacitor. All rights reserved.