Class AlwaysCachingResourceProvider
java.lang.Object
dev.enola.common.io.resource.cache.AlwaysCachingResourceProvider
- All Implemented Interfaces:
ResourceProvider,Provider<String,,Resource> ProviderFromIRI<Resource>
- Direct Known Subclasses:
OptionalCachingResourceProvider
AlwaysCachingResourceProvider is a
ResourceProvider which caches everything in memory.
Note that if the delegate ResourceProvider returns null because it could not get the resource, this is cached as well ("persistent cache miss") - and not retried! (Unless Cache flows over, or entry expires; of course.)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.enola.common.io.resource.ResourceProvider
get, getNonNull, getReadableResource, getReadableResource, getWritableResource, getWritableResource, optional
-
Field Details
-
delegate
-
-
Constructor Details
-
AlwaysCachingResourceProvider
-
-
Method Details
-
getResource
- Specified by:
getResourcein interfaceResourceProvider
-