X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=appc-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fappc%2Fcache%2Fimpl%2FLRUCache.java;h=b82552f202e6722d4601d5193b1393c0aa4c6322;hb=161df8a94bb3b0c34ed16fd4fdba078bd1eeef9a;hp=0e8ba7308b51141861c8ea98bf7af101fbed58f0;hpb=c7d0075d223eab9f89fd28853c4b138792059be9;p=appc.git diff --git a/appc-common/src/main/java/org/openecomp/appc/cache/impl/LRUCache.java b/appc-common/src/main/java/org/openecomp/appc/cache/impl/LRUCache.java index 0e8ba7308..b82552f20 100644 --- a/appc-common/src/main/java/org/openecomp/appc/cache/impl/LRUCache.java +++ b/appc-common/src/main/java/org/openecomp/appc/cache/impl/LRUCache.java @@ -1,10 +1,11 @@ /*- * ============LICENSE_START======================================================= - * openECOMP : APP-C + * ONAP : APPC * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights - * reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -16,22 +17,29 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. * ============LICENSE_END========================================================= */ -package org.openecomp.appc.cache.impl; +package org.onap.appc.cache.impl; import java.util.LinkedHashMap; import java.util.Map; -import org.openecomp.appc.cache.CacheStrategy; +import org.onap.appc.cache.CacheStrategy; +/** + * LRU cache implements CacheStategy + * @param Key + * @param Value + */ public class LRUCache implements CacheStrategy { private Map map; LRUCache(final Integer capacity){ - map = new LinkedHashMap(capacity, 0.75F, true){ + map = new LinkedHashMap(capacity, 0.75F, true) { @Override protected boolean removeEldestEntry(Map.Entry eldest){ return size() > capacity;