Class FileCache

java.lang.Object
org.apache.jackrabbit.guava.common.cache.AbstractCache<String,File>
org.apache.jackrabbit.oak.plugins.blob.FileCache
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.jackrabbit.guava.common.cache.Cache<String,File>

@Deprecated(since="2024-09-23") public class FileCache extends org.apache.jackrabbit.guava.common.cache.AbstractCache<String,File> implements Closeable
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.
  • 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

    Modifier and Type
    Method
    Description
    static FileCache
    build(long maxSize, File root, org.apache.jackrabbit.guava.common.cache.CacheLoader<String,InputStream> loader, @Nullable ExecutorService executor)
    Deprecated.
     
    void
    Deprecated.
     
    boolean
    Deprecated.
     
    get(String key)
    Deprecated.
     
    @Nullable File
    Deprecated.
     
    @Nullable File
    Deprecated.
    Retrieves the file handle from the cache if present and null otherwise.
    Deprecated.
     
    void
    Deprecated.
     
    void
    put(String key, File file)
    Deprecated.
    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

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • build

      public static FileCache build(long maxSize, File root, org.apache.jackrabbit.guava.common.cache.CacheLoader<String,InputStream> loader, @Nullable @Nullable ExecutorService executor)
      Deprecated.
    • put

      public void put(String key, File file)
      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 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)
      Deprecated.
    • getIfPresent

      @Nullable public @Nullable File getIfPresent(String key)
      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

      @Nullable public @Nullable File getIfPresent(Object key)
      Deprecated.
      Specified by:
      getIfPresent in interface org.apache.jackrabbit.guava.common.cache.Cache<String,File>
    • get

      public File get(String key) throws IOException
      Deprecated.
      Throws:
      IOException
    • invalidate

      public void invalidate(Object key)
      Deprecated.
      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>
    • getStats

      public DataStoreCacheStatsMBean getStats()
      Deprecated.
    • close

      public void close()
      Deprecated.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable