Class DefaultModelCache
java.lang.Object
org.apache.maven.repository.internal.DefaultModelCache
- All Implemented Interfaces:
ModelCache
A model builder cache backed by the repository system cache.
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
computeIfAbsent
(Object key, Supplier<Supplier<?>> data) computeIfAbsent
(String groupId, String artifactId, String version, String tag, Supplier<Supplier<?>> data) computeIfAbsent
(Source path, String tag, Supplier<Supplier<?>> data) protected Object
Gets the specified data from the cache.Gets the specified data from the cache.static ModelCache
newInstance
(org.eclipse.aether.RepositorySystemSession session) protected void
void
Puts the specified data into the cache.void
Puts the specified data into the cache.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.maven.model.building.ModelCache
computeIfAbsent, computeIfAbsent, get, get, put, put
-
Method Details
-
newInstance
-
get
Description copied from interface:ModelCache
Gets the specified data from the cache.- Specified by:
get
in interfaceModelCache
- Parameters:
path
- The path of the cache record, must not benull
.tag
- The tag of the cache record, must not benull
.- Returns:
- The requested data or
null
if none was present in the cache.
-
put
Description copied from interface:ModelCache
Puts the specified data into the cache.- Specified by:
put
in interfaceModelCache
- Parameters:
path
- The path of the cache record, must not benull
.tag
- The tag of the cache record, must not benull
.data
- The data to store in the cache, must not benull
.
-
get
Description copied from interface:ModelCache
Gets the specified data from the cache.- Specified by:
get
in interfaceModelCache
- Parameters:
groupId
- The group id of the cache record, must not benull
.artifactId
- The artifact id of the cache record, must not benull
.version
- The version of the cache record, must not benull
.tag
- The tag of the cache record, must not benull
.- Returns:
- The requested data or
null
if none was present in the cache.
-
put
Description copied from interface:ModelCache
Puts the specified data into the cache.- Specified by:
put
in interfaceModelCache
- Parameters:
groupId
- The group id of the cache record, must not benull
.artifactId
- The artifact id of the cache record, must not benull
.version
- The version of the cache record, must not benull
.tag
- The tag of the cache record, must not benull
.data
- The data to store in the cache, must not benull
.
-
get
-
put
-
computeIfAbsent
public Object computeIfAbsent(String groupId, String artifactId, String version, String tag, Supplier<Supplier<?>> data) - Specified by:
computeIfAbsent
in interfaceModelCache
-
computeIfAbsent
- Specified by:
computeIfAbsent
in interfaceModelCache
-
computeIfAbsent
-