Class Overview
Simple Cache
implementation based on the JDK 1.5+
java.util.concurrent package. Useful for testing or simple caching scenarios.
Summary
[Expand]
Inherited Methods |
From class
org.springframework.cache.support.AbstractDelegatingCache
void
|
clear()
Removes all mappings from the cache.
|
boolean
|
containsKey(Object key)
Returns true if this cache contains a mapping for the specified
key.
|
V
|
filterNull(V val)
|
V
|
get(Object key)
Returns the value to which this cache maps the specified key.
|
boolean
|
getAllowNullValues()
|
V
|
put(K key, V value)
Associates the specified value with the specified key in this cache
(optional operation).
|
V
|
remove(Object key)
Removes the mapping for this key from this cache if it is present
(optional operation).
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
org.springframework.cache.Cache
abstract
void
|
clear()
Removes all mappings from the cache.
|
abstract
boolean
|
containsKey(Object key)
Returns true if this cache contains a mapping for the specified
key.
|
abstract
V
|
get(Object key)
Returns the value to which this cache maps the specified key.
|
abstract
String
|
getName()
Returns the cache name.
|
abstract
Object
|
getNativeCache()
Returns the the native, underlying cache provider.
|
abstract
V
|
put(K key, V value)
Associates the specified value with the specified key in this cache
(optional operation).
|
abstract
V
|
putIfAbsent(K key, V value)
If the specified key is not already associated with a value, associate it with the given value.
|
abstract
V
|
remove(Object key)
Removes the mapping for this key from this cache if it is present
(optional operation).
|
abstract
boolean
|
remove(Object key, Object value)
Remove entry for key only if currently mapped to given value.
|
abstract
boolean
|
replace(K key, V oldValue, V newValue)
Replace entry for key only if currently mapped to given value.
|
abstract
V
|
replace(K key, V value)
Replace entry for key only if currently mapped to some value.
|
|
Public Constructors
public
ConcurrentCache
()
public
ConcurrentCache
(String name)
Public Methods
public
V
putIfAbsent
(K key, V value)
public
boolean
replace
(K key, V oldValue, V newValue)
public
V
replace
(K key, V value)