public class FileCache extends <any> implements Closeable
| Modifier and Type | Method and Description |
|---|---|
static FileCache |
build(long maxSize,
File root,
<any> loader,
ExecutorService executor) |
void |
close() |
boolean |
containsKey(String key) |
File |
get(String key) |
File |
getIfPresent(Object key) |
File |
getIfPresent(String key)
Retrieves the file handle from the cache if present and null otherwise.
|
DataStoreCacheStatsMBean |
getStats() |
void |
invalidate(Object key) |
void |
put(String key,
File file)
Puts the given key and file into the cache.
|
public static FileCache build(long maxSize, File root, <any> loader, ExecutorService executor)
public void put(String key, File file)
getIfPresent(String).key - of the filefile - to put into cachepublic boolean containsKey(String key)
public File getIfPresent(String key)
key - of the file to retrievepublic File get(String key) throws IOException
IOExceptionpublic void invalidate(Object key)
public DataStoreCacheStatsMBean getStats()
public void close()
close in interface Closeableclose in interface AutoCloseable"Copyright © 2010 - 2017 Adobe Systems Incorporated. All Rights Reserved"