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
@Component(role=ProjectRealmCache.class)
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
Nested ClassesModifier and TypeClassDescriptionprotected static classCacheKeyNested classes/interfaces inherited from interface org.apache.maven.project.ProjectRealmCache
ProjectRealmCache.CacheRecord, ProjectRealmCache.Key -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<ProjectRealmCache.Key,ProjectRealmCache.CacheRecord> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()voidflush()get(ProjectRealmCache.Key key) put(ProjectRealmCache.Key key, org.codehaus.plexus.classworlds.realm.ClassRealm projectRealm, org.eclipse.aether.graph.DependencyFilter extensionArtifactFilter) voidregister(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:
createKeyin interfaceProjectRealmCache
-
get
- Specified by:
getin interfaceProjectRealmCache
-
put
public ProjectRealmCache.CacheRecord put(ProjectRealmCache.Key key, org.codehaus.plexus.classworlds.realm.ClassRealm projectRealm, org.eclipse.aether.graph.DependencyFilter extensionArtifactFilter) - Specified by:
putin interfaceProjectRealmCache
-
flush
public void flush()- Specified by:
flushin interfaceProjectRealmCache
-
register
public void register(MavenProject project, ProjectRealmCache.Key key, ProjectRealmCache.CacheRecord record) Description copied from interface:ProjectRealmCacheRegisters 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 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:
disposein interfaceorg.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable
-