类 DefaultContextCache.LruCache
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<MergedContextConfiguration,cn.taketoday.context.ApplicationContext>
cn.taketoday.test.context.cache.DefaultContextCache.LruCache
- 所有已实现的接口:
Serializable,Cloneable,Map<MergedContextConfiguration,cn.taketoday.context.ApplicationContext>
- 封闭类:
- DefaultContextCache
private class DefaultContextCache.LruCache
extends LinkedHashMap<MergedContextConfiguration,cn.taketoday.context.ApplicationContext>
Simple cache implementation based on
LinkedHashMap with a maximum
size and a least recently used (LRU) eviction policy that
properly closes application contexts.-
嵌套类概要
从类继承的嵌套类/接口 java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
字段概要
字段 -
构造器概要
构造器构造器说明LruCache(int initialCapacity, float loadFactor) Create a newLruCachewith the supplied initial capacity and load factor. -
方法概要
修饰符和类型方法说明protected booleanremoveEldestEntry(Map.Entry<MergedContextConfiguration, cn.taketoday.context.ApplicationContext> eldest) 从类继承的方法 java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, values从类继承的方法 java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size从类继承的方法 java.util.AbstractMap
equals, hashCode, toString从接口继承的方法 java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
字段详细资料
-
serialVersionUID
private static final long serialVersionUID- 另请参阅:
-
-
构造器详细资料
-
LruCache
LruCache(int initialCapacity, float loadFactor) Create a newLruCachewith the supplied initial capacity and load factor.- 参数:
initialCapacity- the initial capacityloadFactor- the load factor
-
-
方法详细资料
-
removeEldestEntry
protected boolean removeEldestEntry(Map.Entry<MergedContextConfiguration, cn.taketoday.context.ApplicationContext> eldest) - 覆盖:
removeEldestEntry在类中LinkedHashMap<MergedContextConfiguration,cn.taketoday.context.ApplicationContext>
-