org.apache.maven.plugin
Class DefaultPluginArtifactsCache

java.lang.Object
  extended by org.apache.maven.plugin.DefaultPluginArtifactsCache
All Implemented Interfaces:
PluginArtifactsCache

@Component(role=PluginArtifactsCache.class)
public class DefaultPluginArtifactsCache
extends Object
implements PluginArtifactsCache

Author:
Igor Fedorenko, Benjamin Bentmann

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.maven.plugin.PluginArtifactsCache
PluginArtifactsCache.CacheRecord, PluginArtifactsCache.Key
 
Field Summary
protected  Map<PluginArtifactsCache.Key,PluginArtifactsCache.CacheRecord> cache
           
 
Constructor Summary
DefaultPluginArtifactsCache()
           
 
Method Summary
 PluginArtifactsCache.Key createKey(Plugin plugin, org.sonatype.aether.graph.DependencyFilter extensionFilter, List<org.sonatype.aether.repository.RemoteRepository> repositories, org.sonatype.aether.RepositorySystemSession session)
           
 void flush()
           
 PluginArtifactsCache.CacheRecord get(PluginArtifactsCache.Key key)
           
protected static boolean pluginEquals(Plugin a, Plugin b)
           
protected static int pluginHashCode(Plugin plugin)
           
 PluginArtifactsCache.CacheRecord put(PluginArtifactsCache.Key key, List<org.sonatype.aether.artifact.Artifact> pluginArtifacts)
           
 void register(MavenProject project, PluginArtifactsCache.CacheRecord record)
          Registers the specified cache record for usage with the given project.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

protected final Map<PluginArtifactsCache.Key,PluginArtifactsCache.CacheRecord> cache
Constructor Detail

DefaultPluginArtifactsCache

public DefaultPluginArtifactsCache()
Method Detail

createKey

public PluginArtifactsCache.Key createKey(Plugin plugin,
                                          org.sonatype.aether.graph.DependencyFilter extensionFilter,
                                          List<org.sonatype.aether.repository.RemoteRepository> repositories,
                                          org.sonatype.aether.RepositorySystemSession session)
Specified by:
createKey in interface PluginArtifactsCache

get

public PluginArtifactsCache.CacheRecord get(PluginArtifactsCache.Key key)
Specified by:
get in interface PluginArtifactsCache

put

public PluginArtifactsCache.CacheRecord put(PluginArtifactsCache.Key key,
                                            List<org.sonatype.aether.artifact.Artifact> pluginArtifacts)
Specified by:
put in interface PluginArtifactsCache

flush

public void flush()
Specified by:
flush in interface PluginArtifactsCache

pluginHashCode

protected static int pluginHashCode(Plugin plugin)

pluginEquals

protected static boolean pluginEquals(Plugin a,
                                      Plugin b)

register

public void register(MavenProject project,
                     PluginArtifactsCache.CacheRecord record)
Description copied from interface: PluginArtifactsCache
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 PluginArtifactsCache
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-2010 The Apache Software Foundation. All Rights Reserved.