public interface ResourceCache
This code is experimental. While this interface is functional and tested, it may change or be removed in the future.
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 . |
Optional<Resource> get(Metacard metacard)
Metacard
provided.metacard
- metacard that corresponds to the resource that was requestedMetacard
provided, if anyOptional<Resource> get(Metacard metacard, ResourceRequest resourceRequest)
Metacard
provided based on the attributes
of the ResourceRequest
.metacard
- 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 anyboolean contains(Metacard metacard)
Metacard
is present in the cachemetacard
- metacard to use to find a matching resourcetrue
only if the default resource associated currently exists in the cacheboolean contains(Metacard metacard, ResourceRequest resourceRequest)
Metacard
is present in the cachemetacard
- 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.