V
- serializable type of the mapped valuepublic interface DataStore<V extends java.io.Serializable>
Serializable
object.
null
keys or values are not allowed. Implementation should be thread-safe.
Modifier and Type | Method and Description |
---|---|
DataStore<V> |
clear()
Deletes all of the stored keys and values.
|
boolean |
containsKey(java.lang.String key)
Returns whether the store contains the given key.
|
boolean |
containsValue(V value)
Returns whether the store contains the given value.
|
DataStore<V> |
delete(java.lang.String key)
Deletes the stored key and value based on the given key, or ignored if the key doesn't already
exist.
|
V |
get(java.lang.String key)
Returns the stored value for the given key or
null if not found. |
DataStoreFactory |
getDataStoreFactory()
Returns the data store factory.
|
java.lang.String |
getId()
Returns the data store ID.
|
boolean |
isEmpty()
Returns whether there are any stored keys.
|
java.util.Set<java.lang.String> |
keySet()
Returns the unmodifiable set of all stored keys.
|
DataStore<V> |
set(java.lang.String key,
V value)
Stores the given value for the given key (replacing any existing value).
|
int |
size()
Returns the number of stored keys.
|
java.util.Collection<V> |
values()
Returns the unmodifiable collection of all stored values.
|
DataStoreFactory getDataStoreFactory()
java.lang.String getId()
int size() throws java.io.IOException
java.io.IOException
boolean isEmpty() throws java.io.IOException
java.io.IOException
boolean containsKey(java.lang.String key) throws java.io.IOException
java.io.IOException
boolean containsValue(V value) throws java.io.IOException
java.io.IOException
java.util.Set<java.lang.String> keySet() throws java.io.IOException
Order of the keys is not specified.
java.io.IOException
java.util.Collection<V> values() throws java.io.IOException
java.io.IOException
V get(java.lang.String key) throws java.io.IOException
null
if not found.key
- key or null
for null
resultjava.io.IOException
DataStore<V> set(java.lang.String key, V value) throws java.io.IOException
key
- keyvalue
- value objectjava.io.IOException
DataStore<V> clear() throws java.io.IOException
java.io.IOException
Copyright © 2011-2018 Google. All Rights Reserved.