org.apache.maven.plugin
Interface PluginRealmCache

All Known Implementing Classes:
DefaultPluginRealmCache

public interface PluginRealmCache

Caches plugin class realms. Warning: This is an internal utility interface that is only public for technical reasons, it is not part of the public API. In particular, this interface can be changed or deleted without prior notice.

Author:
Igor Fedorenko, Benjamin Bentmann

Nested Class Summary
static class PluginRealmCache.CacheRecord
           
static interface PluginRealmCache.Key
          A cache key.
 
Method Summary
 PluginRealmCache.Key createKey(Plugin plugin, ClassLoader parentRealm, Map<String,ClassLoader> foreignImports, org.sonatype.aether.graph.DependencyFilter dependencyFilter, List<org.sonatype.aether.repository.RemoteRepository> repositories, org.sonatype.aether.RepositorySystemSession session)
           
 void flush()
           
 PluginRealmCache.CacheRecord get(PluginRealmCache.Key key)
           
 PluginRealmCache.CacheRecord put(PluginRealmCache.Key key, ClassRealm pluginRealm, List<Artifact> pluginArtifacts)
           
 void register(MavenProject project, PluginRealmCache.CacheRecord record)
          Registers the specified cache record for usage with the given project.
 

Method Detail

createKey

PluginRealmCache.Key createKey(Plugin plugin,
                               ClassLoader parentRealm,
                               Map<String,ClassLoader> foreignImports,
                               org.sonatype.aether.graph.DependencyFilter dependencyFilter,
                               List<org.sonatype.aether.repository.RemoteRepository> repositories,
                               org.sonatype.aether.RepositorySystemSession session)

get

PluginRealmCache.CacheRecord get(PluginRealmCache.Key key)

put

PluginRealmCache.CacheRecord put(PluginRealmCache.Key key,
                                 ClassRealm pluginRealm,
                                 List<Artifact> pluginArtifacts)

flush

void flush()

register

void register(MavenProject project,
              PluginRealmCache.CacheRecord record)
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.

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.


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.