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.
tools.jackson.databind.type.TypeFactory#withCache , SimpleLookupCache
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public default void | contents(BiConsumer<K, V>
Operation to apply on cache contents. consumer)Method to apply operation on cache contents without exposing them. |
| public LookupCache | |
| public V | |
| public V | |
| public V | |
| public int | Returns: Number of entries currently in cache: may be approximate, only to be used for diagnostics, metrics reporting
|
| clear | back to summary |
|---|---|
| public void clear() Method for removing all contents this cache has. | |
| contents | back to summary |
|---|---|
| public default void contents(BiConsumer<K, V> consumer) Method to apply operation on cache contents without exposing them.
Default implementation throws
| |
| emptyCopy | back to summary |
|---|---|
| public LookupCache Method needed for creating clones but without contents. | |
| get | back to summary |
|---|---|
public V get(K key)
| |
| put | back to summary |
|---|---|
| public V put(K key, V value) | |
| putIfAbsent | back to summary |
|---|---|
| public V putIfAbsent(K key, V value) | |
| size | back to summary |
|---|---|
public int size()
| |