Class DefaultProjectArtifactsCache
- java.lang.Object
-
- org.apache.maven.project.artifact.DefaultProjectArtifactsCache
-
- All Implemented Interfaces:
ProjectArtifactsCache
@Component(role=ProjectArtifactsCache.class) public class DefaultProjectArtifactsCache extends Object implements ProjectArtifactsCache
- Author:
- Igor Fedorenko, Benjamin Bentmann, Anton Tanasenko
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
DefaultProjectArtifactsCache.CacheKey
CacheKey-
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 Map<ProjectArtifactsCache.Key,ProjectArtifactsCache.CacheRecord>
cache
-
Constructor Summary
Constructors Constructor Description DefaultProjectArtifactsCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
assertUniqueKey(ProjectArtifactsCache.Key key)
ProjectArtifactsCache.Key
createKey(MavenProject project, Collection<String> scopesToCollect, Collection<String> scopesToResolve, boolean aggregating, org.eclipse.aether.RepositorySystemSession session)
void
flush()
ProjectArtifactsCache.CacheRecord
get(ProjectArtifactsCache.Key key)
ProjectArtifactsCache.CacheRecord
put(ProjectArtifactsCache.Key key, Set<Artifact> projectArtifacts)
ProjectArtifactsCache.CacheRecord
put(ProjectArtifactsCache.Key key, LifecycleExecutionException exception)
void
register(MavenProject project, ProjectArtifactsCache.Key cacheKey, ProjectArtifactsCache.CacheRecord record)
Registers the specified cache record for usage with the given project.
-
-
-
Field Detail
-
cache
protected final Map<ProjectArtifactsCache.Key,ProjectArtifactsCache.CacheRecord> cache
-
-
Method Detail
-
createKey
public ProjectArtifactsCache.Key createKey(MavenProject project, Collection<String> scopesToCollect, Collection<String> scopesToResolve, boolean aggregating, org.eclipse.aether.RepositorySystemSession session)
- Specified by:
createKey
in interfaceProjectArtifactsCache
-
get
public ProjectArtifactsCache.CacheRecord get(ProjectArtifactsCache.Key key) throws LifecycleExecutionException
- Specified by:
get
in interfaceProjectArtifactsCache
- Throws:
LifecycleExecutionException
-
put
public ProjectArtifactsCache.CacheRecord put(ProjectArtifactsCache.Key key, Set<Artifact> projectArtifacts)
- Specified by:
put
in interfaceProjectArtifactsCache
-
assertUniqueKey
protected void assertUniqueKey(ProjectArtifactsCache.Key key)
-
put
public ProjectArtifactsCache.CacheRecord put(ProjectArtifactsCache.Key key, LifecycleExecutionException exception)
- Specified by:
put
in interfaceProjectArtifactsCache
-
flush
public void flush()
- Specified by:
flush
in interfaceProjectArtifactsCache
-
register
public void register(MavenProject project, ProjectArtifactsCache.Key cacheKey, ProjectArtifactsCache.CacheRecord record)
Description copied from interface:ProjectArtifactsCache
Registers 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:
register
in interfaceProjectArtifactsCache
- Parameters:
project
- The project that employs the plugin realm, must not benull
.record
- The cache record being used for the project, must not benull
.
-
-