V - serializable type of the mapped valuepublic abstract class AbstractDataStore<V extends java.io.Serializable> extends java.lang.Object implements DataStore<V>
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDataStore(DataStoreFactory dataStoreFactory,
java.lang.String id) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
|
int |
size()
Returns the number of stored keys.
|
protected AbstractDataStore(DataStoreFactory dataStoreFactory, java.lang.String id)
dataStoreFactory - data store factoryid - data store IDpublic DataStoreFactory getDataStoreFactory()
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
getDataStoreFactory in interface DataStore<V extends java.io.Serializable>public final java.lang.String getId()
DataStorepublic boolean containsKey(java.lang.String key)
throws java.io.IOException
Default implementation is to call DataStore.get(String) and check if it is null.
containsKey in interface DataStore<V extends java.io.Serializable>java.io.IOExceptionpublic boolean containsValue(V value) throws java.io.IOException
Default implementation is to call Collection.contains(Object) on DataStore.values().
containsValue in interface DataStore<V extends java.io.Serializable>java.io.IOExceptionpublic boolean isEmpty()
throws java.io.IOException
Default implementation is to check if size() is 0.
public int size()
throws java.io.IOException
Default implementation is to call Set.size() on DataStore.keySet().
Copyright © 2011-2018 Google. All Rights Reserved.