Package org.apache.maven.project
Class ReactorModelCache
- java.lang.Object
-
- org.apache.maven.project.ReactorModelCache
-
- All Implemented Interfaces:
ModelCache
class ReactorModelCache extends java.lang.Object implements ModelCache
A simple model cache used to accelerate model building during a reactor build.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ReactorModelCache.CacheKey
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<ReactorModelCache.CacheKey,java.lang.Object>
models
-
Constructor Summary
Constructors Constructor Description ReactorModelCache()
-
Method Summary
All 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.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.
-
-
-
Field Detail
-
models
private final java.util.Map<ReactorModelCache.CacheKey,java.lang.Object> models
-
-
Method Detail
-
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
.
-
-