public class CachingResourceManager extends Object implements ResourceManager
EMPTY_RESOURCE_MANAGER
Constructor and Description |
---|
CachingResourceManager(int metadataCacheSize, long maxFileSize, DirectBufferCache dataCache, ResourceManager underlyingResourceManager, int maxAge) |
Modifier and Type | Method and Description |
---|---|
void | close() |
int | getMaxAge() |
long | getMaxFileSize() |
CachedResource | getResource(String path) Returns a resource for the given path. |
void | invalidate(String path) |
boolean | isResourceChangeListenerSupported() |
void | registerResourceChangeListener(ResourceChangeListener listener) Registers a resource change listener, if the underlying resource manager support it |
void | removeResourceChangeListener(ResourceChangeListener listener) Removes a resource change listener |
public CachingResourceManager(int metadataCacheSize, long maxFileSize, DirectBufferCache dataCache, ResourceManager underlyingResourceManager, int maxAge)
public CachedResource getResource(String path) throws IOException
ResourceManager
getResource
in interface ResourceManager
path
- The pathIOException
public boolean isResourceChangeListenerSupported()
isResourceChangeListenerSupported
in interface ResourceManager
true
if a resource change listener is supportedpublic void registerResourceChangeListener(ResourceChangeListener listener)
ResourceManager
registerResourceChangeListener
in interface ResourceManager
listener
- The listener to registerpublic void removeResourceChangeListener(ResourceChangeListener listener)
ResourceManager
removeResourceChangeListener
in interface ResourceManager
public void invalidate(String path)
public long getMaxFileSize()
public int getMaxAge()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2017 JBoss by Red Hat. All rights reserved.