1package org.apache.maven.artifact.repository;
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 */2122/**23 * Caches auxiliary data used during repository access like already processed metadata. The data in the cache is meant24 * for exclusive consumption by the repository system and is opaque to the cache implementation.25 * 26 * @author Benjamin Bentmann27 */28 @Deprecated
29//30// Used by Tycho and will break users and force them to upgrade to Maven 3.1 so we should really leave31// this here, possibly indefinitely.32//33publicinterfaceRepositoryCache34 {
3536/**37 * Puts the specified data into the cache. <strong>Warning:</strong> The cache will directly save the provided38 * reference. If the cached data is mutable, i.e. could be modified after being put into the cache, the caller is39 * responsible for creating a copy of the original data and store the copy in the cache.40 * 41 * @param request The repository request from which this cache was retrieved, must not be {@code null}.42 * @param key The key to use associate the data with, must not be {@code null}.43 * @param data The data to store in the cache, may be {@code null}.44 */45void put( RepositoryRequest request, Object key, Object data );
4647/**48 * Gets the specified data from the cache. <strong>Warning:</strong> The cache will directly return the saved49 * reference. If the cached data is to be modified after its retrieval, the caller is responsible to create a copy50 * of the returned data and use this instead of the cache record.51 * 52 * @param request The repository request from which this cache was retrieved, must not be {@code null}.53 * @param key The key to use for lookup of the data, must not be {@code null}.54 * @return The requested data or {@code null} if none was present in the cache.55 */56 Object get( RepositoryRequest request, Object key );
5758 }