Package com.google.api.client.util.store
Class MemoryDataStoreFactory
java.lang.Object
com.google.api.client.util.store.AbstractDataStoreFactory
com.google.api.client.util.store.MemoryDataStoreFactory
- All Implemented Interfaces:
DataStoreFactory
Thread-safe in-memory implementation of a data store factory.
For convenience, a default global instance is provided in getDefaultInstance()
.
- Since:
- 1.16
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
Holder for the result ofgetDefaultInstance()
.(package private) static class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <V extends Serializable>
DataStore<V> Returns a new instance of a type-specific data store based on the given unique ID.static MemoryDataStoreFactory
Returns a global thread-safe instance.Methods inherited from class com.google.api.client.util.store.AbstractDataStoreFactory
getDataStore
-
Constructor Details
-
MemoryDataStoreFactory
public MemoryDataStoreFactory()
-
-
Method Details
-
createDataStore
Description copied from class:AbstractDataStoreFactory
Returns a new instance of a type-specific data store based on the given unique ID.The
DataStore.getId()
must match theid
parameter from this method.- Specified by:
createDataStore
in classAbstractDataStoreFactory
- Type Parameters:
V
- serializable type of the mapped value- Parameters:
id
- unique ID to refer to typed data store- Throws:
IOException
-
getDefaultInstance
Returns a global thread-safe instance.
-