Class CachingResourceManager

java.lang.Object
io.undertow.server.handlers.resource.CachingResourceManager
All Implemented Interfaces:
ResourceManager, Closeable, AutoCloseable

public class CachingResourceManager extends Object implements ResourceManager
Author:
Stuart Douglas
  • Constructor Details

    • CachingResourceManager

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

    • getResource

      public CachedResource getResource(String p) throws 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:
      IOException
    • invalidate

      public void invalidate(String path)
    • getMaxFileSize

      public long getMaxFileSize()
    • getMaxAge

      public int getMaxAge()
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException