Note that serialization behavior is such that contents are NOT serialized, on assumption that all use cases are for caching where persistence does not make sense. The only thing serialized is the cache size of Map.
Since Jackson 2.12, there has been pluggable LookupCache interface which
allows users, frameworks, provide their own cache implementations.
Since Jackson 2.14, the implementation
| Modifier and Type | Field and Description |
|---|---|
| protected final int | |
| protected final transient PrivateMaxEntriesMap | |
| protected final int | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear()
Implements com. |
| public void | contents(BiConsumer<K, V>
Operation to apply on cache contents. consumer)Overrides default com. |
| public LookupCache | emptyCopy()
Overrides default com. |
| public V | get(Object key)
Implements com. Note key is of type Object only to retain binary backwards-compatibility |
| public V | |
| public V | |
| protected Object | |
| public int |
| _initialEntries | back to summary |
|---|---|
| protected final int _initialEntries | |
| _map | back to summary |
|---|---|
| protected final transient PrivateMaxEntriesMap<K, V> _map | |
| _maxEntries | back to summary |
|---|---|
| protected final int _maxEntries | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| LRUMap | back to summary |
|---|---|
| public LRUMap(int initialEntries, int maxEntries) | |
| clear | back to summary |
|---|---|
| public void clear() Implements com. Doc from com. Method for removing all contents this cache has.
| |
| contents | back to summary |
|---|---|
| public void contents(BiConsumer<K, V> consumer) Overrides default com. Doc from com. Method to apply operation on cache contents without exposing them.
Default implementation throws
| |
| emptyCopy | back to summary |
|---|---|
| public LookupCache Overrides default com. Doc from com. Method needed for creating clones but without contents.
Default implementation throws
| |
| get | back to summary |
|---|---|
| public V get(Object key) Implements com. Doc from com. Note key is of type Object only to retain binary backwards-compatibility
| |
| put | back to summary |
|---|---|
| public V put(K key, V value) Implements com.
| |
| putIfAbsent | back to summary |
|---|---|
| public V putIfAbsent(K key, V value) Implements com.
| |
| readResolve | back to summary |
|---|---|
| protected Object readResolve() | |
| size | back to summary |
|---|---|
| public int size() Implements com.
| |