java.lang.Object | |
↳ | org.springframework.cache.support.AbstractDelegatingCache<K, V> |
Known Direct Subclasses
ConcurrentCache<K, V>
|
Abstract base class delegating most of the Map-like methods to the underlying cache. Note:Allows null values to be stored, even if the underlying map does not support them.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
NULL_HOLDER |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new instance using the given delegate.
| |||||||||||
Creates a new instance using the given delegate.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Removes all mappings from the cache.
| |||||||||||
Returns true if this cache contains a mapping for the specified
key.
| |||||||||||
Returns the value to which this cache maps the specified key.
| |||||||||||
Associates the specified value with the specified key in this cache
(optional operation).
| |||||||||||
Removes the mapping for this key from this cache if it is present
(optional operation).
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.cache.Cache
|
Creates a new instance using the given delegate.
delegate | map delegate |
---|
Creates a new instance using the given delegate.
delegate | map delegate |
---|---|
allowNullValues | flag indicating whether null values are allowed or not |
Removes all mappings from the cache.
Returns true if this cache contains a mapping for the specified key. More formally, returns true if and only if this cache contains a mapping for a key k such that (key==null ? k==null : key.equals(k)). (There can be at most one such mapping.)
key | key whose presence in this cache is to be tested. |
---|
Returns the value to which this cache maps the specified key. Returns null if the cache contains no mapping for this key. A return value of null does not necessarily indicate that the cache contains no mapping for the key; it's also possible that the cache explicitly maps the key to null. The containsKey operation may be used to distinguish these two cases.
More formally, if this cache contains a mapping from a key k to a value v such that (key==null ? k==null : key.equals(k)), then this method returns v; otherwise it returns null. (There can be at most one such mapping.)
key | key whose associated value is to be returned. |
---|
Associates the specified value with the specified key in this cache
(optional operation). If the cache previously contained a mapping for
this key, the old value is replaced by the specified value. (A cache
m is said to contain a mapping for a key k if and only
if m.containsKey(k)
would return
true.))
key | key with which the specified value is to be associated. |
---|---|
value | value to be associated with the specified key. |
Removes the mapping for this key from this cache if it is present
(optional operation). More formally, if this cache contains a mapping
from key k to value v such that
(key==null ? k==null : key.equals(k))
, that mapping
is removed. (The cache can contain at most one such mapping.)
Returns the value to which the cache previously associated the key, or null if the cache contained no mapping for this key. (A null return can also indicate that the cache previously associated null with the specified key if the implementation supports null values.) The cache will not contain a mapping for the specified key once the call returns.
key | key whose mapping is to be removed from the cache. |
---|