warning removed

This commit is contained in:
lucio 2024-04-02 12:32:28 +02:00
parent 9f1dab34f4
commit a0a58f344b
1 changed files with 2 additions and 6 deletions

View File

@ -3,7 +3,6 @@ package org.gcube.common.core.publisher.is.legacy;
import java.net.URI;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public class RegistryCache extends LinkedHashMap<String,List<URI>>{
@ -13,13 +12,13 @@ public class RegistryCache extends LinkedHashMap<String,List<URI>>{
private static final long serialVersionUID = 1L;
private final int capacity;
//private final int capacity;
private long accessCount = 0;
private long hitCount = 0;
public RegistryCache(int capacity){
super(capacity + 1, 1.1f, true);
this.capacity = capacity;
//this.capacity = capacity;
}
public List<URI> get(String key){
@ -31,9 +30,6 @@ public class RegistryCache extends LinkedHashMap<String,List<URI>>{
return value;
}
protected boolean removeEldestEntry(Map.Entry eldest){
return size() > capacity;
}
public long getAccessCount(){
return accessCount;