Class DefaultProjectArtifactsCache
- java.lang.Object
-
- org.apache.maven.project.artifact.DefaultProjectArtifactsCache
-
- All Implemented Interfaces:
ProjectArtifactsCache
@Component(role=ProjectArtifactsCache.class) public class DefaultProjectArtifactsCache extends java.lang.Object implements ProjectArtifactsCache
- Author:
- Igor Fedorenko, Benjamin Bentmann, Anton Tanasenko
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classDefaultProjectArtifactsCache.CacheKeyCacheKey-
Nested classes/interfaces inherited from interface org.apache.maven.project.artifact.ProjectArtifactsCache
ProjectArtifactsCache.CacheRecord, ProjectArtifactsCache.Key
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<ProjectArtifactsCache.Key,ProjectArtifactsCache.CacheRecord>cacheprotected java.util.Map<ProjectArtifactsCache.Key,ProjectArtifactsCache.Key>keys
-
Constructor Summary
Constructors Constructor Description DefaultProjectArtifactsCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidassertUniqueKey(ProjectArtifactsCache.Key key)ProjectArtifactsCache.KeycreateKey(MavenProject project, java.util.Collection<java.lang.String> scopesToCollect, java.util.Collection<java.lang.String> scopesToResolve, boolean aggregating, org.eclipse.aether.RepositorySystemSession session)voidflush()ProjectArtifactsCache.CacheRecordget(ProjectArtifactsCache.Key key)ProjectArtifactsCache.CacheRecordput(ProjectArtifactsCache.Key key, java.util.Set<org.apache.maven.artifact.Artifact> projectArtifacts)ProjectArtifactsCache.CacheRecordput(ProjectArtifactsCache.Key key, LifecycleExecutionException exception)voidregister(MavenProject project, ProjectArtifactsCache.Key cacheKey, ProjectArtifactsCache.CacheRecord rcrd)Registers the specified cache record for usage with the given project.
-
-
-
Field Detail
-
cache
protected final java.util.Map<ProjectArtifactsCache.Key,ProjectArtifactsCache.CacheRecord> cache
-
keys
protected final java.util.Map<ProjectArtifactsCache.Key,ProjectArtifactsCache.Key> keys
-
-
Method Detail
-
createKey
public ProjectArtifactsCache.Key createKey(MavenProject project, java.util.Collection<java.lang.String> scopesToCollect, java.util.Collection<java.lang.String> scopesToResolve, boolean aggregating, org.eclipse.aether.RepositorySystemSession session)
- Specified by:
createKeyin interfaceProjectArtifactsCache
-
get
public ProjectArtifactsCache.CacheRecord get(ProjectArtifactsCache.Key key) throws LifecycleExecutionException
- Specified by:
getin interfaceProjectArtifactsCache- Throws:
LifecycleExecutionException
-
put
public ProjectArtifactsCache.CacheRecord put(ProjectArtifactsCache.Key key, java.util.Set<org.apache.maven.artifact.Artifact> projectArtifacts)
- Specified by:
putin interfaceProjectArtifactsCache
-
assertUniqueKey
protected void assertUniqueKey(ProjectArtifactsCache.Key key)
-
put
public ProjectArtifactsCache.CacheRecord put(ProjectArtifactsCache.Key key, LifecycleExecutionException exception)
- Specified by:
putin interfaceProjectArtifactsCache
-
flush
public void flush()
- Specified by:
flushin interfaceProjectArtifactsCache
-
register
public void register(MavenProject project, ProjectArtifactsCache.Key cacheKey, ProjectArtifactsCache.CacheRecord rcrd)
Description copied from interface:ProjectArtifactsCacheRegisters the specified cache record for usage with the given project. Integrators can use the information collected from this method in combination with a custom cache implementation to dispose unused records from the cache.- Specified by:
registerin interfaceProjectArtifactsCache- Parameters:
project- The project that employs the plugin realm, must not benull.rcrd- The cache record being used for the project, must not benull.
-
-