Class CachingResourceManager
java.lang.Object
io.undertow.server.handlers.resource.CachingResourceManager
- All Implemented Interfaces:
ResourceManager,Closeable,AutoCloseable
- Author:
- Stuart Douglas
-
Field Summary
Fields inherited from interface io.undertow.server.handlers.resource.ResourceManager
EMPTY_RESOURCE_MANAGER -
Constructor Summary
ConstructorsConstructorDescriptionCachingResourceManager(int metadataCacheSize, long maxFileSize, DirectBufferCache dataCache, ResourceManager underlyingResourceManager, int maxAge) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intlongReturns a resource for the given path.voidinvalidate(String path)
-
Constructor Details
-
CachingResourceManager
public CachingResourceManager(int metadataCacheSize, long maxFileSize, DirectBufferCache dataCache, ResourceManager underlyingResourceManager, int maxAge)
-
-
Method Details
-
getResource
Description copied from interface:ResourceManagerReturns a resource for the given path. It is the responsibility of the called to make sure that the path in Canonicalised.- Specified by:
getResourcein interfaceResourceManager- Parameters:
p- The path- Returns:
- The resource representing the path, or null if no resource was found.
- Throws:
IOException
-
invalidate
-
getMaxFileSize
public long getMaxFileSize() -
getMaxAge
public int getMaxAge() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-