Package org.apache.maven.plugin
Class DefaultPluginArtifactsCache
- java.lang.Object
-
- org.apache.maven.plugin.DefaultPluginArtifactsCache
-
- All Implemented Interfaces:
PluginArtifactsCache
@Component(role=PluginArtifactsCache.class) public class DefaultPluginArtifactsCache extends java.lang.Object implements PluginArtifactsCache
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classDefaultPluginArtifactsCache.CacheKeyCacheKey-
Nested classes/interfaces inherited from interface org.apache.maven.plugin.PluginArtifactsCache
PluginArtifactsCache.CacheRecord, PluginArtifactsCache.Key
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<PluginArtifactsCache.Key,PluginArtifactsCache.CacheRecord>cache
-
Constructor Summary
Constructors Constructor Description DefaultPluginArtifactsCache()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidassertUniqueKey(PluginArtifactsCache.Key key)PluginArtifactsCache.KeycreateKey(Plugin plugin, org.eclipse.aether.graph.DependencyFilter extensionFilter, java.util.List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session)voidflush()PluginArtifactsCache.CacheRecordget(PluginArtifactsCache.Key key)protected static booleanpluginEquals(Plugin a, Plugin b)protected static intpluginHashCode(Plugin plugin)PluginArtifactsCache.CacheRecordput(PluginArtifactsCache.Key key, java.util.List<Artifact> pluginArtifacts)PluginArtifactsCache.CacheRecordput(PluginArtifactsCache.Key key, PluginResolutionException exception)voidregister(MavenProject project, PluginArtifactsCache.Key cacheKey, PluginArtifactsCache.CacheRecord record)Registers the specified cache record for usage with the given project.
-
-
-
Field Detail
-
cache
protected final java.util.Map<PluginArtifactsCache.Key,PluginArtifactsCache.CacheRecord> cache
-
-
Method Detail
-
createKey
public PluginArtifactsCache.Key createKey(Plugin plugin, org.eclipse.aether.graph.DependencyFilter extensionFilter, java.util.List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session)
- Specified by:
createKeyin interfacePluginArtifactsCache
-
get
public PluginArtifactsCache.CacheRecord get(PluginArtifactsCache.Key key) throws PluginResolutionException
- Specified by:
getin interfacePluginArtifactsCache- Throws:
PluginResolutionException
-
put
public PluginArtifactsCache.CacheRecord put(PluginArtifactsCache.Key key, java.util.List<Artifact> pluginArtifacts)
- Specified by:
putin interfacePluginArtifactsCache
-
assertUniqueKey
protected void assertUniqueKey(PluginArtifactsCache.Key key)
-
put
public PluginArtifactsCache.CacheRecord put(PluginArtifactsCache.Key key, PluginResolutionException exception)
- Specified by:
putin interfacePluginArtifactsCache
-
flush
public void flush()
- Specified by:
flushin interfacePluginArtifactsCache
-
pluginHashCode
protected static int pluginHashCode(Plugin plugin)
-
register
public void register(MavenProject project, PluginArtifactsCache.Key cacheKey, PluginArtifactsCache.CacheRecord record)
Description copied from interface:PluginArtifactsCacheRegisters 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 interfacePluginArtifactsCache- Parameters:
project- The project that employs the plugin realm, must not benull.record- The cache record being used for the project, must not benull.
-
-