public class MemoryKeyValueStore<K,V> extends Object implements KeyValueStore<K,V>
| Constructor and Description |
|---|
MemoryKeyValueStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCache()
clear all cache.
|
void |
close()
close the store.
|
void |
flush()
flush to disk.
|
V |
get(K key)
get value from store.
|
void |
put(K key,
V value)
put key value into store.
|
void |
remove(K key)
remove key in the store.
|
public void put(K key, V value) throws IOException
KeyValueStoreput in interface KeyValueStore<K,V>IOExceptionpublic V get(K key) throws IOException
KeyValueStoreget in interface KeyValueStore<K,V>IOExceptionpublic void remove(K key) throws IOException
KeyValueStoreremove in interface KeyValueStore<K,V>IOExceptionpublic void flush()
throws IOException
KeyValueStoreflush in interface KeyValueStore<K,V>IOExceptionpublic void clearCache()
KeyValueStoreclearCache in interface KeyValueStore<K,V>public void close()
throws IOException
KeyValueStoreclose in interface KeyValueStore<K,V>IOExceptionCopyright © 2020. All rights reserved.