Package com.fasterxml.classmate.util
Class ResolvedTypeCache
- java.lang.Object
-
- com.fasterxml.classmate.util.ResolvedTypeCache
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ConcurrentTypeCache,LRUTypeCache
public abstract class ResolvedTypeCache extends java.lang.Object implements java.io.SerializableSimple LRU cache used for storing up to specified number of most recently accessedResolvedTypeinstances. Since usage pattern is such that caller needs synchronization, cache access methods are fully synchronized so that caller need not do explicit synchronization.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ResolvedTypeCache()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void_addForTest(ResolvedType type)Method only used by test code: do not use otherwise.static ResolvedTypeCacheconcurrentCache(int maxEntries)abstract ResolvedTypefind(ResolvedTypeKey key)ResolvedTypeKeykey(java.lang.Class<?> simpleType)Helper method for constructing reusable cache keysResolvedTypeKeykey(java.lang.Class<?> simpleType, ResolvedType[] tp)Helper method for constructing reusable cache keysstatic ResolvedTypeCachelruCache(int maxEntries)abstract voidput(ResolvedTypeKey key, ResolvedType type)abstract intsize()
-
-
-
Method Detail
-
lruCache
public static ResolvedTypeCache lruCache(int maxEntries)
- Since:
- 1.4
-
concurrentCache
public static ResolvedTypeCache concurrentCache(int maxEntries)
- Since:
- 1.4
-
key
public ResolvedTypeKey key(java.lang.Class<?> simpleType)
Helper method for constructing reusable cache keys
-
key
public ResolvedTypeKey key(java.lang.Class<?> simpleType, ResolvedType[] tp)
Helper method for constructing reusable cache keys
-
find
public abstract ResolvedType find(ResolvedTypeKey key)
-
size
public abstract int size()
-
put
public abstract void put(ResolvedTypeKey key, ResolvedType type)
-
_addForTest
protected void _addForTest(ResolvedType type)
Method only used by test code: do not use otherwise.
-
-