Class DefaultModelCache
- java.lang.Object
-
- org.apache.maven.repository.internal.DefaultModelCache
-
- All Implemented Interfaces:
ModelCache
class DefaultModelCache extends java.lang.Object implements ModelCache
A model builder cache backed by the repository system cache.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classDefaultModelCache.Key
-
Constructor Summary
Constructors Modifier Constructor Description privateDefaultModelCache(org.eclipse.aether.RepositorySystemSession session)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectget(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String tag)Gets the specified data from the cache.static ModelCachenewInstance(org.eclipse.aether.RepositorySystemSession session)voidput(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String tag, java.lang.Object data)Puts the specified data into the cache.
-
-
-
Method Detail
-
newInstance
public static ModelCache newInstance(org.eclipse.aether.RepositorySystemSession session)
-
get
public java.lang.Object get(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String tag)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
public void put(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String tag, java.lang.Object data)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.
-
-