Class DefaultProjectArtifactsCache
java.lang.Object
org.apache.maven.project.artifact.DefaultProjectArtifactsCache
- All Implemented Interfaces:
ProjectArtifactsCache
@Named
@Singleton
public class DefaultProjectArtifactsCache
extends Object
implements ProjectArtifactsCache
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
CacheKeyNested classes/interfaces inherited from interface org.apache.maven.project.artifact.ProjectArtifactsCache
ProjectArtifactsCache.ArtifactsSetWithResult, ProjectArtifactsCache.CacheRecord, ProjectArtifactsCache.Key
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Map
<ProjectArtifactsCache.Key, ProjectArtifactsCache.CacheRecord> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
createKey
(MavenProject project, Collection<String> scopesToCollect, Collection<String> scopesToResolve, boolean aggregating, org.eclipse.aether.RepositorySystemSession session) void
flush()
put
(ProjectArtifactsCache.Key key, Set<Artifact> projectArtifacts) 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 Details
-
cache
-
-
Constructor Details
-
DefaultProjectArtifactsCache
public DefaultProjectArtifactsCache()
-
-
Method Details
-
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
-
put
public ProjectArtifactsCache.CacheRecord put(ProjectArtifactsCache.Key key, LifecycleExecutionException exception) - Specified by:
put
in interfaceProjectArtifactsCache
-
assertUniqueKey
-
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
.
-