Class FileCache
java.lang.Object
org.apache.jackrabbit.oak.plugins.blob.FileCache
- All Implemented Interfaces:
Closeable,AutoCloseable
Deprecated.
The Jackrabbit Oak Blob Plugins library is designed for Oak-internal use only and thus deprecated. It will not be part of the AEM SDK after April 2025.
-
Method Summary
Modifier and TypeMethodDescriptionstatic FileCachebuild(long maxSize, File root, org.apache.jackrabbit.oak.cache.api.CacheLoader<String, InputStream> loader, @Nullable ExecutorService executor) Deprecated.voidclose()Deprecated.booleancontainsKey(String key) Deprecated.Deprecated.longDeprecated.Get the current entry count (number of files).@Nullable FilegetIfPresent(Object key) Deprecated.@Nullable FilegetIfPresent(String key) Deprecated.Retrieves the file handle from the cache if present and null otherwise.getStats()Deprecated.voidinvalidate(Object key) Deprecated.voidDeprecated.Puts the given key and file into the cache.voidsetMaxEntryCount(long maxEntryCount) Deprecated.Set the maximum number of files.
-
Method Details
-
setMaxEntryCount
public void setMaxEntryCount(long maxEntryCount) Deprecated.Set the maximum number of files. -
getEntryCount
public long getEntryCount()Deprecated.Get the current entry count (number of files). -
build
public static FileCache build(long maxSize, File root, org.apache.jackrabbit.oak.cache.api.CacheLoader<String, InputStream> loader, @Nullable @Nullable ExecutorService executor) Deprecated. -
put
Deprecated.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 usinggetIfPresent(String).- Parameters:
key- of the filefile- to put into cache
-
containsKey
Deprecated. -
getIfPresent
Deprecated.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
Deprecated. -
get
Deprecated.- Throws:
IOException
-
invalidate
Deprecated. -
getStats
Deprecated. -
close
public void close()Deprecated.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-