Package org.apache.maven.plugin
Class DefaultPluginRealmCache
java.lang.Object
org.apache.maven.plugin.DefaultPluginRealmCache
- All Implemented Interfaces:
- PluginRealmCache,- org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable
@Named
@Singleton
public class DefaultPluginRealmCache
extends Object
implements PluginRealmCache, org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable
Default PluginCache implementation. Assumes cached data does not change.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected static classCacheKeyNested classes/interfaces inherited from interface org.apache.maven.plugin.PluginRealmCachePluginRealmCache.CacheRecord, PluginRealmCache.Key, PluginRealmCache.PluginRealmSupplier
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final Map<PluginRealmCache.Key,PluginRealmCache.CacheRecord> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncreateKey(Plugin plugin, ClassLoader parentRealm, Map<String, ClassLoader> foreignImports, org.eclipse.aether.graph.DependencyFilter dependencyFilter, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session) voiddispose()voidflush()get(PluginRealmCache.Key key) get(PluginRealmCache.Key key, PluginRealmCache.PluginRealmSupplier supplier) protected static booleanpluginEquals(Plugin a, Plugin b) protected static intpluginHashCode(Plugin plugin) put(PluginRealmCache.Key key, org.codehaus.plexus.classworlds.realm.ClassRealm pluginRealm, List<Artifact> pluginArtifacts) voidregister(MavenProject project, PluginRealmCache.Key key, PluginRealmCache.CacheRecord record) Registers the specified cache record for usage with the given project.
- 
Field Details- 
cache
 
- 
- 
Constructor Details- 
DefaultPluginRealmCachepublic DefaultPluginRealmCache()
 
- 
- 
Method Details- 
createKeypublic PluginRealmCache.Key createKey(Plugin plugin, ClassLoader parentRealm, Map<String, ClassLoader> foreignImports, org.eclipse.aether.graph.DependencyFilter dependencyFilter, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session) - Specified by:
- createKeyin interface- PluginRealmCache
 
- 
get- Specified by:
- getin interface- PluginRealmCache
 
- 
getpublic PluginRealmCache.CacheRecord get(PluginRealmCache.Key key, PluginRealmCache.PluginRealmSupplier supplier) throws PluginResolutionException, PluginContainerException - Specified by:
- getin interface- PluginRealmCache
- Throws:
- PluginResolutionException
- PluginContainerException
 
- 
putpublic PluginRealmCache.CacheRecord put(PluginRealmCache.Key key, org.codehaus.plexus.classworlds.realm.ClassRealm pluginRealm, List<Artifact> pluginArtifacts) - Specified by:
- putin interface- PluginRealmCache
 
- 
flushpublic void flush()- Specified by:
- flushin interface- PluginRealmCache
 
- 
pluginHashCode
- 
pluginEquals
- 
registerpublic void register(MavenProject project, PluginRealmCache.Key key, PluginRealmCache.CacheRecord record) Description copied from interface:PluginRealmCacheRegisters 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 interface- PluginRealmCache
- Parameters:
- project- The project that employs the plugin realm, must not be- null.
- record- The cache record being used for the project, must not be- null.
 
- 
disposepublic void dispose()- Specified by:
- disposein interface- org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable
 
 
-