public class ArtifactVersionsCache extends Object
AbstractVersionDetails.getNewestUpdate(Optional) API| Constructor and Description |
|---|
ArtifactVersionsCache(BiFunction<AbstractVersionDetails,Optional<Segment>,?> cachedFunction)
Constructs a new instance given the concrete function for obtaining the details
|
| Modifier and Type | Method and Description |
|---|---|
<V extends AbstractVersionDetails,R> |
get(V artifactVersions,
Optional<Segment> updateScope)
Returns the required information for the given
ArtifactVersions object and the given update scope. |
public ArtifactVersionsCache(BiFunction<AbstractVersionDetails,Optional<Segment>,?> cachedFunction)
cachedFunction - reference to the function computing the required informationpublic <V extends AbstractVersionDetails,R> R get(V artifactVersions, Optional<Segment> updateScope)
ArtifactVersions object and the given update scope.
If the information is already present in cache, the cached version is returned. Otherwise,
the artifactVersions object is queried and the response is cached.artifactVersions - ArtifactVersions object referring to the given dependencyupdateScope - update scopeCopyright © 2008–2022 MojoHaus. All rights reserved.