public class ResourceCacheImpl extends Object implements ResourceCache
ResourceCacheImpl.| Constructor and Description |
|---|
ResourceCacheImpl(ResourceCacheInterface delegate) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Metacard metacard)
Determines if the resource associated with the
Metacard is present in the cache |
boolean |
contains(Metacard metacard,
ResourceRequest resourceRequest)
Determines if the resource associated with the
Metacard is present in the cache |
Optional<Resource> |
get(Metacard metacard)
Gets the default resource associated with the
Metacard provided. |
Optional<Resource> |
get(Metacard metacard,
ResourceRequest resourceRequest)
Gets a specific resource associated with the
Metacard provided based on the attributes
of the ResourceRequest. |
public ResourceCacheImpl(ResourceCacheInterface delegate)
public Optional<Resource> get(Metacard metacard)
ResourceCacheMetacard provided.get in interface ResourceCachemetacard - metacard that corresponds to the resource that was requestedMetacard provided, if anypublic Optional<Resource> get(Metacard metacard, ResourceRequest resourceRequest)
ResourceCacheMetacard provided based on the attributes
of the ResourceRequest.get in interface ResourceCachemetacard - metacard that corresponds to the resource that was requestedresourceRequest - request object that was used to retrieve the resource. Will be used to
determine the type of resource that will be returned.Metacard provided, if anypublic boolean contains(Metacard metacard)
ResourceCacheMetacard is present in the cachecontains in interface ResourceCachemetacard - metacard to use to find a matching resourcetrue only if the default resource associated currently exists in the cachepublic boolean contains(Metacard metacard, ResourceRequest resourceRequest)
ResourceCacheMetacard is present in the cachecontains in interface ResourceCachemetacard - metacard to use to find a matching resourceresourceRequest - request object that was used to retrieve the resource. Will be used to
determine the type of resource to look up.true only if the resource of the given type associated currently exists in the
cacheThis work is licensed under a Creative Commons Attribution 4.0 International License.