Package org.apache.maven.model.building
Interface ModelCache
- All Known Implementing Classes:
 DefaultModelCache
public interface ModelCache
Caches auxiliary data used during model building like already processed raw/effective models. The data in the cache
 is meant for exclusive consumption by the model builder and is opaque to the cache implementation. The cache key is
 formed by a combination of group id, artifact id, version and tag. The first three components generally refer to the
 identify of a model. The tag allows for further classification of the associated data on the sole discretion of the
 model builder.
- 
Method Summary
Modifier and TypeMethodDescriptioncomputeIfAbsent(String groupId, String artifactId, String version, String tag, Supplier<Supplier<?>> data) default <T> TcomputeIfAbsent(String groupId, String artifactId, String version, org.apache.maven.model.building.ModelCacheTag<T> tag, Supplier<Supplier<T>> data) computeIfAbsent(Source path, String tag, Supplier<Supplier<?>> data) default <T> TcomputeIfAbsent(Source path, org.apache.maven.model.building.ModelCacheTag<T> tag, Supplier<Supplier<T>> data) Gets the specified data from the cache.default <T> Tget(String groupId, String artifactId, String version, org.apache.maven.model.building.ModelCacheTag<T> tag) Gets the specified data from the cache.default ObjectGets the specified data from the cache.default <T> TGets the specified data from the cache.voidPuts the specified data into the cache.default <T> voidput(String groupId, String artifactId, String version, org.apache.maven.model.building.ModelCacheTag<T> tag, T data) Puts the specified data into the cache.default voidPuts the specified data into the cache.default <T> voidPuts the specified data into the cache. 
- 
Method Details
- 
put
Puts the specified data into the cache.- 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.- Since:
 - 4.0.0
 
 - 
get
Gets the specified data from the cache.- 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. - Since:
 - 4.0.0
 
 - 
put
Puts the specified data into the cache.- 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
Gets the specified data from the cache.- 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
Puts the specified data into the cache.- 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.- Since:
 - 4.0.0
 
 - 
get
Gets the specified data from the cache.- 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. - Since:
 - 4.0.0
 
 - 
put
default <T> void put(String groupId, String artifactId, String version, org.apache.maven.model.building.ModelCacheTag<T> tag, T data) Puts the specified data into the cache.- 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
default <T> T get(String groupId, String artifactId, String version, org.apache.maven.model.building.ModelCacheTag<T> tag) Gets the specified data from the cache.- 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. 
 - 
computeIfAbsent
 - 
computeIfAbsent
 - 
computeIfAbsent
 - 
computeIfAbsent
 
 -