mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
add sessionStat support
This commit is contained in:
@@ -8,12 +8,16 @@ public class LRUCache<K, V> extends LinkedHashMap<K, V> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final int maxSize;
|
||||
|
||||
public LRUCache(int maxSize){
|
||||
this(maxSize, 16, 0.75f, false);
|
||||
}
|
||||
|
||||
public LRUCache(int maxSize, int initialCapacity, float loadFactor, boolean accessOrder){
|
||||
super(initialCapacity, loadFactor, accessOrder);
|
||||
this.maxSize = maxSize;
|
||||
}
|
||||
|
||||
protected boolean removeEldestEntry(Map.Entry<K,V> eldest) {
|
||||
|
||||
protected boolean removeEldestEntry(Map.Entry<K, V> eldest) {
|
||||
return this.size() > this.maxSize;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user