Class DefaultPluginRealmCache

  • All Implemented Interfaces:
    PluginRealmCache, org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable

    @Component(role=PluginRealmCache.class)
    public class DefaultPluginRealmCache
    extends java.lang.Object
    implements PluginRealmCache, org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable
    Default PluginCache implementation. Assumes cached data does not change.
    • Constructor Detail

      • DefaultPluginRealmCache

        public DefaultPluginRealmCache()
    • Method Detail

      • createKey

        public PluginRealmCache.Key createKey​(org.apache.maven.model.Plugin plugin,
                                              java.lang.ClassLoader parentRealm,
                                              java.util.Map<java.lang.String,​java.lang.ClassLoader> foreignImports,
                                              org.eclipse.aether.graph.DependencyFilter dependencyFilter,
                                              java.util.List<org.eclipse.aether.repository.RemoteRepository> repositories,
                                              org.eclipse.aether.RepositorySystemSession session)
        Specified by:
        createKey in interface PluginRealmCache
      • pluginHashCode

        protected static int pluginHashCode​(org.apache.maven.model.Plugin plugin)
      • pluginEquals

        protected static boolean pluginEquals​(org.apache.maven.model.Plugin a,
                                              org.apache.maven.model.Plugin b)
      • register

        public void register​(MavenProject project,
                             PluginRealmCache.Key key,
                             PluginRealmCache.CacheRecord record_)
        Description copied from interface: PluginRealmCache
        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.
        Specified by:
        register in 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.
      • dispose

        public void dispose()
        Specified by:
        dispose in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable