1package org.apache.maven.plugin;
23/*4 * Licensed to the Apache Software Foundation (ASF) under one5 * or more contributor license agreements. See the NOTICE file6 * distributed with this work for additional information7 * regarding copyright ownership. The ASF licenses this file8 * to you under the Apache License, Version 2.0 (the9 * "License"); you may not use this file except in compliance10 * with the License. You may obtain a copy of the License at11 *12 * http://www.apache.org/licenses/LICENSE-2.013 *14 * Unless required by applicable law or agreed to in writing,15 * software distributed under the License is distributed on an16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY17 * KIND, either express or implied. See the License for the18 * specific language governing permissions and limitations19 * under the License.20 */2122import java.util.List;
2324import org.apache.maven.project.ExtensionDescriptor;
25import org.apache.maven.project.MavenProject;
26import org.codehaus.plexus.classworlds.realm.ClassRealm;
27import org.eclipse.aether.artifact.Artifact;
2829/**30 * Caches extension class realms. <strong>Warning:</strong> This is an internal utility interface that is only public31 * for technical reasons, it is not part of the public API. In particular, this interface can be changed or deleted32 * without prior notice.33 * 34 * @author Igor Fedorenko35 * @author Benjamin Bentmann36 */37publicinterfaceExtensionRealmCache38 {
3940publicstaticclassCacheRecord41 {
4243publicfinal ClassRealm realm;
4445publicfinalExtensionDescriptor desciptor;
4647publicCacheRecord( ClassRealm realm, ExtensionDescriptor descriptor )
48 {
49this.realm = realm;
50this.desciptor = descriptor;
51 }
5253 }
5455CacheRecord get( List<? extends Artifact> extensionArtifacts );
5657CacheRecord put( List<? extends Artifact> extensionArtifacts, ClassRealm extensionRealm,
58ExtensionDescriptor extensionDescriptor );
5960void flush();
6162/**63 * Registers the specified cache record for usage with the given project. Integrators can use the information64 * collected from this method in combination with a custom cache implementation to dispose unused records from the65 * cache.66 * 67 * @param project The project that employs the plugin realm, must not be {@code null}.68 * @param record The cache record being used for the project, must not be {@code null}.69 */70void register( MavenProject project, CacheRecord record );
7172 }