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 class
DefaultModelCache.Key
-
Constructor Summary
Constructors Modifier Constructor Description private
DefaultModelCache(org.eclipse.aether.RepositorySystemSession session)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
get(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String tag)
Gets the specified data from the cache.static ModelCache
newInstance(org.eclipse.aether.RepositorySystemSession session)
void
put(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: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
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: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
.
-
-