@Component(role=PluginRealmCache.class) public class DefaultPluginRealmCache extends Object implements PluginRealmCache, org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable
Modifier and Type | Class and Description |
---|---|
protected static class |
DefaultPluginRealmCache.CacheKey
CacheKey
|
PluginRealmCache.CacheRecord, PluginRealmCache.Key
Modifier and Type | Field and Description |
---|---|
protected Map<PluginRealmCache.Key,PluginRealmCache.CacheRecord> |
cache |
Constructor and Description |
---|
DefaultPluginRealmCache() |
Modifier and Type | Method and Description |
---|---|
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) |
void |
dispose() |
void |
flush() |
PluginRealmCache.CacheRecord |
get(PluginRealmCache.Key key) |
protected static boolean |
pluginEquals(Plugin a,
Plugin b) |
protected static int |
pluginHashCode(Plugin plugin) |
PluginRealmCache.CacheRecord |
put(PluginRealmCache.Key key,
ClassRealm pluginRealm,
List<Artifact> pluginArtifacts) |
void |
register(MavenProject project,
PluginRealmCache.Key key,
PluginRealmCache.CacheRecord record)
Registers the specified cache record for usage with the given project.
|
protected final Map<PluginRealmCache.Key,PluginRealmCache.CacheRecord> cache
public 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)
createKey
in interface PluginRealmCache
public PluginRealmCache.CacheRecord get(PluginRealmCache.Key key)
get
in interface PluginRealmCache
public PluginRealmCache.CacheRecord put(PluginRealmCache.Key key, ClassRealm pluginRealm, List<Artifact> pluginArtifacts)
put
in interface PluginRealmCache
public void flush()
flush
in interface PluginRealmCache
protected static int pluginHashCode(Plugin plugin)
public void register(MavenProject project, PluginRealmCache.Key key, PluginRealmCache.CacheRecord record)
PluginRealmCache
register
in interface PluginRealmCache
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
.public void dispose()
dispose
in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable
Copyright © 2001–2019 The Apache Software Foundation. All rights reserved.