Interface LookupCache<K,V>
-
- All Known Implementing Classes:
LRUMap
public interface LookupCache<K,V>An interface describing the required API for the Jackson-databind Type cache.Note that while interface itself does not specify synchronization requirements for implementations, specific use cases do. Typically implementations are expected to be thread-safe, that is, to handle synchronization.
- Since:
- 2.12 (for forwards-compatiblity with 3.0)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Method for removing all contents this cache has.Vget(java.lang.Object key)NOTE: key is of type Object only to retain binary backwards-compatibilityVput(K key, V value)VputIfAbsent(K key, V value)intsize()
-
-
-
Method Detail
-
size
int size()
- Returns:
- Number of entries currently in cache: may be approximate, only to be used for diagnostics, metrics reporting
-
get
V get(java.lang.Object key)
NOTE: key is of type Object only to retain binary backwards-compatibility- Parameters:
key-- Returns:
- value associated with key (can return null)
-
clear
void clear()
Method for removing all contents this cache has.
-
-