Package org.apache.maven.plugin
Class DefaultExtensionRealmCache
java.lang.Object
org.apache.maven.plugin.DefaultExtensionRealmCache
- All Implemented Interfaces:
ExtensionRealmCache
,org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable
@Component(role=ExtensionRealmCache.class)
public class DefaultExtensionRealmCache
extends Object
implements ExtensionRealmCache, org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable
Default extension realm cache implementation. Assumes cached data does not change.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
CacheKeyNested classes/interfaces inherited from interface org.apache.maven.plugin.ExtensionRealmCache
ExtensionRealmCache.CacheRecord, ExtensionRealmCache.Key
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Map
<ExtensionRealmCache.Key, ExtensionRealmCache.CacheRecord> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
void
flush()
put
(ExtensionRealmCache.Key key, org.codehaus.plexus.classworlds.realm.ClassRealm extensionRealm, ExtensionDescriptor extensionDescriptor, List<Artifact> artifacts) void
register
(MavenProject project, ExtensionRealmCache.Key key, ExtensionRealmCache.CacheRecord record) Registers the specified cache record for usage with the given project.
-
Field Details
-
cache
-
-
Constructor Details
-
DefaultExtensionRealmCache
public DefaultExtensionRealmCache()
-
-
Method Details
-
createKey
- Specified by:
createKey
in interfaceExtensionRealmCache
-
get
- Specified by:
get
in interfaceExtensionRealmCache
-
put
public ExtensionRealmCache.CacheRecord put(ExtensionRealmCache.Key key, org.codehaus.plexus.classworlds.realm.ClassRealm extensionRealm, ExtensionDescriptor extensionDescriptor, List<Artifact> artifacts) - Specified by:
put
in interfaceExtensionRealmCache
-
flush
public void flush()- Specified by:
flush
in interfaceExtensionRealmCache
-
register
public void register(MavenProject project, ExtensionRealmCache.Key key, ExtensionRealmCache.CacheRecord record) Description copied from interface:ExtensionRealmCache
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 interfaceExtensionRealmCache
- Parameters:
project
- The project that employs the plugin realm, must not benull
.record
- The cache record being used for the project, must not benull
.
-
dispose
public void dispose()- Specified by:
dispose
in interfaceorg.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable
-