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 classHolder 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 MemoryDataStoreFactoryReturns a global thread-safe instance.Methods inherited from class AbstractDataStoreFactory
getDataStore
-
Constructor Details
-
MemoryDataStoreFactory
public MemoryDataStoreFactory()
-
-
Method Details
-
createDataStore
Description copied from class:AbstractDataStoreFactoryReturns a new instance of a type-specific data store based on the given unique ID.The
DataStore.getId()must match theidparameter from this method.- Specified by:
createDataStorein 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.
-