V - the value type.public class DefaultFilenameSerializableFileValueManager<V extends Serializable> extends AbstractFilenameFileValueManager<V>
Serializable.SerializableUtils.writeSerializableToFile(java.io.File, Serializable),
SerializableUtils.readSerializableFromFile(java.io.File)| Constructor and Description |
|---|
DefaultFilenameSerializableFileValueManager(CachingDirectory cachingDirectory,
PersistencesRestoreMethod persistencesRestoreMethod)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
V |
retrieveFileValue(DefaultFileValueWrapper<String,V> valueWrapper)
Loads the value from the file in valueWrapper.
|
void |
storeFileValue(DefaultFileValueWrapper<String,V> valueWrapper,
String key,
V value)
This method shall the take the Value and stored it in a file given by the valueWrapper.
|
constructFile, flush, reconstructKey, retrieveValue, storeValuecast, constructWrapper, getCachingDirectory, getFile, removeAll, removeValue, restore, updateExpireTimegetLogger, getPersistencesRestoreMethod, isPersistedpublic DefaultFilenameSerializableFileValueManager(CachingDirectory cachingDirectory, PersistencesRestoreMethod persistencesRestoreMethod) throws IllegalArgumentException, NullPointerException
cachingDirectory - the directory where to store the cached values.persistencesRestoreMethod - the restore method, when reconstructing the LRUCachingMap.IllegalArgumentException - if cacheDirectory isnt a valid directory.NullPointerException - if persistencesRestoreMethod or cachingDirectory is null.public void storeFileValue(DefaultFileValueWrapper<String,V> valueWrapper, String key, V value) throws RuntimeException
AbstractFilenameFileValueManagerstoreFileValue in class AbstractFilenameFileValueManager<V extends Serializable>valueWrapper - the value wrapper which holds the file.key - the key.value - the value.RuntimeException - if the value can not be stored in the file.public V retrieveFileValue(DefaultFileValueWrapper<String,V> valueWrapper)
AbstractFilenameFileValueManagerretrieveFileValue in class AbstractFilenameFileValueManager<V extends Serializable>valueWrapper - the value wrapperCopyright © 2016. All rights reserved.