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 ObjectcomputeIfAbsent(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 ObjectGets the specified data from the cache.Gets the specified data from the cache.static ModelCachenewInstance(org.eclipse.aether.RepositorySystemSession session) protected voidvoidPuts the specified data into the cache.voidPuts the specified data into the cache.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.model.building.ModelCache
computeIfAbsent, computeIfAbsent, get, get, put, put
-
Method Details
-
newInstance
-
get
Description copied from interface:ModelCacheGets the specified data from the cache.- Specified by:
getin 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
nullif none was present in the cache.
-
put
Description copied from interface:ModelCachePuts the specified data into the cache.- Specified by:
putin 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:ModelCacheGets the specified data from the cache.- Specified by:
getin 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
nullif none was present in the cache.
-
put
Description copied from interface:ModelCachePuts the specified data into the cache.- Specified by:
putin 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:
computeIfAbsentin interfaceModelCache
-
computeIfAbsent
- Specified by:
computeIfAbsentin interfaceModelCache
-
computeIfAbsent
-