public final class DefaultFilenameFileReferenceLRUCachingMap extends DefaultLRUCachingMap<String,File>
DefaultFilenameFileReferenceValueManager
,
Serialized FormConstructor and Description |
---|
DefaultFilenameFileReferenceLRUCachingMap(LRUCachingMapConfiguration configuration,
CachingDirectory cachingDirectory,
PersistencesRestoreMethod persistencesRestoreMethod)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
File |
put(File file)
Puts a reference file in the cache
|
File |
put(String key,
File value)
Overrides the put method, ignores the key, but uses the File.getName() as key.
|
cleanup, exists, extend, extend, extend, get, getConfiguration, getExpirationDateTime, getExpirationTimeSpan, getExpirationTimeSpan, getKeys, getLastCleanupDateTime, getLogger, getNextToExpire, getStoreDateTime, getValueManager, getValueWrapper, isExpired, isPersisted, peek, reload, remove, removeAll, restoreCacheElement, size
public DefaultFilenameFileReferenceLRUCachingMap(LRUCachingMapConfiguration configuration, CachingDirectory cachingDirectory, PersistencesRestoreMethod persistencesRestoreMethod) throws IllegalArgumentException, NullPointerException
configuration
- the configuration.cachingDirectory
- where to look after files when restoring the cache.persistencesRestoreMethod
- which method to use when restoring the cache.IllegalArgumentException
- if cachingDirectory isnt a valid directory.NullPointerException
- if configuration or cachingDirectory is null
.public File put(File file) throws NullPointerException
file
- the fileNullPointerException
- if the file is null
.public File put(String key, File value) throws NullPointerException
put
in interface LRUCachingMap<String,File>
put
in class DefaultLRUCachingMap<String,File>
key
- the keyvalue
- the value if the value is null
the key is removed.null
.NullPointerException
- if the key is null
.File.getName()
Copyright © 2016. All rights reserved.