public class MapStore extends Object implements KeyValueStore
| Constructor and Description |
|---|
MapStore()
Private constructor for the singleton pattern.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the store.
|
String |
get(String key)
Get the value for a key from store.
|
boolean |
isHealthy()
Get the health status of the store.
|
boolean |
isOpen()
Get the open / closed status of the store.
|
void |
open()
Open the store.
|
String |
put(String key,
String value)
Set a value for the key.
|
Map<String,String> |
putAll(Map<String,String> entries)
Set a multiple key/value pairs.
|
String |
remove(String key)
Remove a key from store.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOrDefault, replaceStorepublic void open()
KeyValueStoreopen in interface KeyValueStorepublic void close()
KeyValueStoreclose in interface KeyValueStoreclose in interface Closeableclose in interface AutoCloseablepublic boolean isOpen()
KeyValueStoreisOpen in interface KeyValueStorepublic String remove(@NotNull String key)
KeyValueStoreremove in interface KeyValueStorekey - Key to removepublic String get(@NotNull String key)
KeyValueStoreget in interface KeyValueStorekey - Key to get the value forpublic boolean isHealthy()
KeyValueStoreisHealthy in interface KeyValueStorepublic String put(@NotNull String key, String value)
KeyValueStoreAlso removes the key if the value is null.
put in interface KeyValueStorekey - Key to setvalue - Value to set for the given keypublic Map<String,String> putAll(@NotNull Map<String,String> entries)
KeyValueStoreRemoves any keys with a null value.
putAll in interface KeyValueStoreentries - Map of key/value pairs to putCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.