K
- the key type.V
- the value type.public class DefaultIndexedSerializableFileValueManager<K extends Serializable,V extends Serializable> extends AbstractIndexedFileValueManager<K,V>
SerializableUtils.writeSerializableToFile(java.io.File, Serializable)
,
SerializableUtils.readSerializableFromFile(java.io.File)
PERSISTENCE_STORAGE_INDEX_FILE, PERSISTENCE_STORAGE_INDEX_FILENAME
Constructor and Description |
---|
DefaultIndexedSerializableFileValueManager(CachingDirectory cachingDirectory,
PersistencesRestoreMethod persistencesRestoreMethod,
int indexSaveInterval) |
Modifier and Type | Method and Description |
---|---|
V |
retrieveFileValue(DefaultFileValueWrapper<K,V> valueWrapper)
Loads the value from the file in valueWrapper.
|
void |
storeFileValue(DefaultFileValueWrapper<K,V> valueWrapper,
K key,
V value)
This method shall the take the Value and stored it in a file given by the valueWrapper.
|
constructFile, flush, getIndexSaveInterval, reconstructKey, removeAll, removeValue, retrieveValue, storeValue
cast, constructWrapper, getCachingDirectory, getFile, restore, updateExpireTime
getLogger, getPersistencesRestoreMethod, isPersisted
public DefaultIndexedSerializableFileValueManager(CachingDirectory cachingDirectory, PersistencesRestoreMethod persistencesRestoreMethod, int indexSaveInterval)
cachingDirectory
- persistencesRestoreMethod
- indexSaveInterval
- public void storeFileValue(DefaultFileValueWrapper<K,V> valueWrapper, K key, V value) throws RuntimeException
AbstractIndexedFileValueManager
storeFileValue
in class AbstractIndexedFileValueManager<K extends Serializable,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<K,V> valueWrapper)
AbstractIndexedFileValueManager
retrieveFileValue
in class AbstractIndexedFileValueManager<K extends Serializable,V extends Serializable>
valueWrapper
- the value wrapperCopyright © 2016. All rights reserved.