| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final LRUCache | cache
A cache of file metadata, such as if a file exists or not |
| private final DirectBufferCache | dataCache
A cache of byte buffers |
| private final int | |
| private final long | maxFileSize
The biggest file size we cache |
| private final ResourceManager | underlyingResourceManager
The underlying resource manager |
| Access | Constructor and Description |
|---|---|
| public | CachingResourceManager(final int metadataCacheSize, final long maxFileSize, final DirectBufferCache dataCache, final ResourceManager underlyingResourceManager, final int maxAge)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements java. Closes this stream and releases any system resources associated with it. |
| pack-priv DirectBufferCache | |
| public int | |
| public long | |
| public CachedResource | getResource(final String
The path p)Implements io. Returns a resource for the given path. |
| public void | |
| public boolean | |
| public void | registerResourceChangeListener(ResourceChangeListener
The listener to register listener)Implements io. Registers a resource change listener, if the underlying resource manager support it |
| public void | removeResourceChangeListener(ResourceChangeListener listener)
Implements io. Removes a resource change listener |
| cache | back to summary |
|---|---|
| private final LRUCache<String, Object> cache A cache of file metadata, such as if a file exists or not | |
| dataCache | back to summary |
|---|---|
| private final DirectBufferCache dataCache A cache of byte buffers | |
| maxAge | back to summary |
|---|---|
| private final int maxAge | |
| maxFileSize | back to summary |
|---|---|
| private final long maxFileSize The biggest file size we cache | |
| underlyingResourceManager | back to summary |
|---|---|
| private final ResourceManager underlyingResourceManager The underlying resource manager | |
| CachingResourceManager | back to summary |
|---|---|
| public CachingResourceManager(final int metadataCacheSize, final long maxFileSize, final DirectBufferCache dataCache, final ResourceManager underlyingResourceManager, final int maxAge) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| getDataCache | back to summary |
|---|---|
| pack-priv DirectBufferCache getDataCache() | |
| getMaxAge | back to summary |
|---|---|
| public int getMaxAge() | |
| getMaxFileSize | back to summary |
|---|---|
| public long getMaxFileSize() | |
| getResource | back to summary |
|---|---|
| public CachedResource getResource(final String p) throws IOException Implements io. Doc from io. Returns a resource for the given path. It is the responsibility of the called to make sure that the path in Canonicalised.
| |
| invalidate | back to summary |
|---|---|
| public void invalidate(String path) | |
| isResourceChangeListenerSupported | back to summary |
|---|---|
| public boolean isResourceChangeListenerSupported() Implements io.
| |
| registerResourceChangeListener | back to summary |
|---|---|
| public void registerResourceChangeListener(ResourceChangeListener listener) Implements io. Doc from io. Registers a resource change listener, if the underlying resource manager support it
| |
| removeResourceChangeListener | back to summary |
|---|---|
| public void removeResourceChangeListener(ResourceChangeListener listener) Implements io. Doc from io. Removes a resource change listener
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv volatile long |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public void |
| nextCheckTime | back to summary |
|---|---|
| pack-priv volatile long nextCheckTime | |
| NoResourceMarker | back to summary |
|---|---|
| private NoResourceMarker(long nextCheckTime) | |
| getNextCheckTime | back to summary |
|---|---|
| public long getNextCheckTime() | |
| setNextCheckTime | back to summary |
|---|---|
| public void setNextCheckTime(long nextCheckTime) | |