java.lang.Object
org.apache.jackrabbit.guava.common.cache.AbstractCache<
String ,
File >
org.apache.jackrabbit.oak.plugins.blob.FileCache
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.jackrabbit.guava.common.cache.AbstractCache
org.apache.jackrabbit.guava.common.cache.AbstractCache.SimpleStatsCounter, org.apache.jackrabbit.guava.common.cache.AbstractCache.StatsCounter
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
void
boolean
Retrieves the file handle from the cache if present and null otherwise.
void
void
Puts the given key and file into the cache.
Methods inherited from class org.apache.jackrabbit.guava.common.cache.AbstractCache
asMap, cleanUp, get, getAllPresent, invalidateAll, invalidateAll, putAll, size, stats
Method Details
put
Puts the given key and file into the cache.
The file is moved to the cache. So, the original file
won't be available after this operation. It can be retrieved
using
getIfPresent(String).
Specified by:
put in interface org.apache.jackrabbit.guava.common.cache.Cache<String ,File >
Overrides:
put in class org.apache.jackrabbit.guava.common.cache.AbstractCache<String ,File >
Parameters:
key - of the file
file - to put into cache
containsKey
public boolean containsKey (String key)
getIfPresent
@Nullable
public @Nullable File getIfPresent (String key)
Retrieves the file handle from the cache if present and null otherwise.
Parameters:
key - of the file to retrieve
Returns:
File handle if available
getIfPresent
@Nullable
public @Nullable File getIfPresent (Object key)
Specified by:
getIfPresent in interface org.apache.jackrabbit.guava.common.cache.Cache<String ,File >
invalidate
public void invalidate (Object key)
Specified by:
invalidate in interface org.apache.jackrabbit.guava.common.cache.Cache<String ,File >
Overrides:
invalidate in class org.apache.jackrabbit.guava.common.cache.AbstractCache<String ,File >