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 java.lang.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 Classes Modifier and Type Class Description protected static classDefaultProjectRealmCache.CacheKeyCacheKey-
Nested classes/interfaces inherited from interface org.apache.maven.project.ProjectRealmCache
ProjectRealmCache.CacheRecord, ProjectRealmCache.Key
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<ProjectRealmCache.Key,ProjectRealmCache.CacheRecord>cache
-
Constructor Summary
Constructors Constructor Description DefaultProjectRealmCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProjectRealmCache.KeycreateKey(java.util.List<? extends org.codehaus.plexus.classworlds.realm.ClassRealm> extensionRealms)voiddispose()voidflush()ProjectRealmCache.CacheRecordget(ProjectRealmCache.Key key)ProjectRealmCache.CacheRecordput(ProjectRealmCache.Key key, org.codehaus.plexus.classworlds.realm.ClassRealm projectRealm, org.eclipse.aether.graph.DependencyFilter extensionArtifactFilter)voidregister(MavenProject project, ProjectRealmCache.Key key, ProjectRealmCache.CacheRecord rcrd)Registers the specified cache record for usage with the given project.
-
-
-
Field Detail
-
cache
protected final java.util.Map<ProjectRealmCache.Key,ProjectRealmCache.CacheRecord> cache
-
-
Method Detail
-
createKey
public ProjectRealmCache.Key createKey(java.util.List<? extends org.codehaus.plexus.classworlds.realm.ClassRealm> extensionRealms)
- Specified by:
createKeyin interfaceProjectRealmCache
-
get
public ProjectRealmCache.CacheRecord get(ProjectRealmCache.Key key)
- 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 rcrd)
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.rcrd- 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
-
-