Package org.apache.maven.project
Class DefaultProjectRealmCache
java.lang.Object
org.apache.maven.project.DefaultProjectRealmCache
- All Implemented Interfaces:
ProjectRealmCache
,org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable
@Named
@Singleton
public class DefaultProjectRealmCache
extends Object
implements ProjectRealmCache, org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable
Default project realm cache implementation. Assumes cached data does not change.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
CacheKeyNested classes/interfaces inherited from interface org.apache.maven.project.ProjectRealmCache
ProjectRealmCache.CacheRecord, ProjectRealmCache.Key
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Map
<ProjectRealmCache.Key, ProjectRealmCache.CacheRecord> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
void
flush()
get
(ProjectRealmCache.Key key) put
(ProjectRealmCache.Key key, org.codehaus.plexus.classworlds.realm.ClassRealm projectRealm, org.eclipse.aether.graph.DependencyFilter extensionArtifactFilter) void
register
(MavenProject project, ProjectRealmCache.Key key, ProjectRealmCache.CacheRecord record) Registers the specified cache record for usage with the given project.
-
Field Details
-
cache
-
-
Constructor Details
-
DefaultProjectRealmCache
public DefaultProjectRealmCache()
-
-
Method Details
-
createKey
public ProjectRealmCache.Key createKey(List<? extends org.codehaus.plexus.classworlds.realm.ClassRealm> extensionRealms) - Specified by:
createKey
in interfaceProjectRealmCache
-
get
- Specified by:
get
in interfaceProjectRealmCache
-
put
public ProjectRealmCache.CacheRecord put(ProjectRealmCache.Key key, org.codehaus.plexus.classworlds.realm.ClassRealm projectRealm, org.eclipse.aether.graph.DependencyFilter extensionArtifactFilter) - Specified by:
put
in interfaceProjectRealmCache
-
flush
public void flush()- Specified by:
flush
in interfaceProjectRealmCache
-
register
public void register(MavenProject project, ProjectRealmCache.Key key, ProjectRealmCache.CacheRecord record) Description copied from interface:ProjectRealmCache
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 interfaceProjectRealmCache
- Parameters:
project
- The project that employs the plugin realm, must not benull
.record
- The cache record being used for the project, must not benull
.
-
dispose
public void dispose()- Specified by:
dispose
in interfaceorg.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable
-