Class FileDataStoreFactory.FileDataStore<V extends Serializable>
java.lang.Object
com.google.api.client.util.store.AbstractDataStore<V>
com.google.api.client.util.store.AbstractMemoryDataStore<V>
com.google.api.client.util.store.FileDataStoreFactory.FileDataStore<V>
- Type Parameters:
V- serializable type of the mapped value
- All Implemented Interfaces:
DataStore<V>
- Enclosing class:
FileDataStoreFactory
static class FileDataStoreFactory.FileDataStore<V extends Serializable>
extends AbstractMemoryDataStore<V>
File data store that inherits from the abstract memory data store because the key-value pairs
are stored in a memory cache, and saved in the file (see
save() when changing values.- Since:
- 1.16
-
Field Summary
FieldsFields inherited from class AbstractMemoryDataStore
keyValueMap -
Constructor Summary
ConstructorsConstructorDescriptionFileDataStore(FileDataStoreFactory dataStore, File dataDirectory, String id) -
Method Summary
Modifier and TypeMethodDescriptionReturns the data store factory.voidsave()Persist the key-value map into storage at the end ofAbstractMemoryDataStore.set(String, V),AbstractMemoryDataStore.delete(String), andAbstractMemoryDataStore.clear().Methods inherited from class AbstractMemoryDataStore
clear, containsKey, containsValue, delete, get, isEmpty, keySet, set, size, toString, valuesMethods inherited from class AbstractDataStore
getId
-
Field Details
-
dataFile
File to store data.
-
-
Constructor Details
-
FileDataStore
FileDataStore(FileDataStoreFactory dataStore, File dataDirectory, String id) throws IOException - Throws:
IOException
-
-
Method Details
-
save
Description copied from class:AbstractMemoryDataStorePersist the key-value map into storage at the end ofAbstractMemoryDataStore.set(String, V),AbstractMemoryDataStore.delete(String), andAbstractMemoryDataStore.clear().- Overrides:
savein classAbstractMemoryDataStore<V extends Serializable>- Throws:
IOException
-
getDataStoreFactory
Description copied from class:AbstractDataStoreReturns the data store factory.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
- Specified by:
getDataStoreFactoryin interfaceDataStore<V extends Serializable>- Overrides:
getDataStoreFactoryin classAbstractDataStore<V extends Serializable>
-