|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dtolabs.rundeck.core.utils.cache.FileCache<T>
public class FileCache<T extends FileCache.Cacheable>
FileCache stores items associated with a file and expires them if the file is removed or modified. The FileCache.ItemCreator
interface is used to create cacheable items
Nested Class Summary | |
---|---|
static interface |
FileCache.Cacheable
Cacheable item for FileCache. |
static interface |
FileCache.Expiration<T>
Determines whether a cached item has expired |
static interface |
FileCache.Expireable
Allows expire method to be called for a cached item when it is expired from the cache |
static interface |
FileCache.ItemCreator<T>
Creates an item to store in the cache |
static class |
FileCache.LastModifiedExpiration<T>
Expires items if the lastModified of the file is greater than the cached time for the item. |
Constructor Summary | |
---|---|
FileCache()
Use the FileCache.LastModifiedExpiration expiration policy by default. |
|
FileCache(FileCache.Expiration<T> expiration)
Use a specific expiration policy |
Method Summary | |
---|---|
T |
get(java.io.File file,
FileCache.ItemCreator<T> creator)
Get entry for a file, and use the creator if necessary to create it. |
void |
remove(java.io.File file)
Remove entry for a file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileCache()
FileCache.LastModifiedExpiration
expiration policy by default.
public FileCache(FileCache.Expiration<T> expiration)
Method Detail |
---|
public void remove(java.io.File file)
public T get(java.io.File file, FileCache.ItemCreator<T> creator)
FileCache.Expireable
then the FileCache.Expireable.expire()
method will be called on it.
file
- the iflecreator
- the item creator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |