Class CachingResourceManager

  • All Implemented Interfaces:
    ResourceManager, java.io.Closeable, java.lang.AutoCloseable

    public class CachingResourceManager
    extends java.lang.Object
    implements ResourceManager
    Author:
    Stuart Douglas
    • Constructor Detail

      • CachingResourceManager

        public CachingResourceManager​(int metadataCacheSize,
                                      long maxFileSize,
                                      DirectBufferCache dataCache,
                                      ResourceManager underlyingResourceManager,
                                      int maxAge)
    • Method Detail

      • getResource

        public CachedResource getResource​(java.lang.String p)
                                   throws java.io.IOException
        Description copied from interface: ResourceManager
        Returns a resource for the given path. It is the responsibility of the called to make sure that the path in Canonicalised.
        Specified by:
        getResource in interface ResourceManager
        Parameters:
        p - The path
        Returns:
        The resource representing the path, or null if no resource was found.
        Throws:
        java.io.IOException
      • invalidate

        public void invalidate​(java.lang.String path)
      • getMaxFileSize

        public long getMaxFileSize()
      • getMaxAge

        public int getMaxAge()
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException