Package org.springframework.cache.jcache
Class JCacheCache
java.lang.Object
org.springframework.cache.support.AbstractValueAdaptingCache
org.springframework.cache.jcache.JCacheCache
- All Implemented Interfaces:
org.springframework.cache.Cache
public class JCacheCache
extends org.springframework.cache.support.AbstractValueAdaptingCache
Cache
implementation on top of a
javax.cache.Cache
instance.
Note: This class has been updated for JCache 1.0, as of Spring 4.0.
- Since:
- 3.2
- Author:
- Juergen Hoeller, Stephane Nicoll
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.cache.Cache
org.springframework.cache.Cache.ValueRetrievalException, org.springframework.cache.Cache.ValueWrapper
-
Constructor Summary
ConstructorDescriptionJCacheCache
(javax.cache.Cache<Object, Object> jcache) Create aJCacheCache
instance.JCacheCache
(javax.cache.Cache<Object, Object> jcache, boolean allowNullValues) Create aJCacheCache
instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
boolean
evictIfPresent
(Object key) <T> T
final String
getName()
boolean
protected Object
void
org.springframework.cache.Cache.ValueWrapper
putIfAbsent
(Object key, Object value) Methods inherited from class org.springframework.cache.support.AbstractValueAdaptingCache
fromStoreValue, get, get, isAllowNullValues, toStoreValue, toValueWrapper
-
Constructor Details
-
JCacheCache
Create aJCacheCache
instance.- Parameters:
jcache
- backing JCache Cache instance
-
JCacheCache
Create aJCacheCache
instance.- Parameters:
jcache
- backing JCache Cache instanceallowNullValues
- whether to accept and convert null values for this cache
-
-
Method Details
-
getName
-
getNativeCache
-
lookup
- Specified by:
lookup
in classorg.springframework.cache.support.AbstractValueAdaptingCache
-
get
-
put
-
putIfAbsent
-
evict
-
evictIfPresent
-
clear
public void clear() -
invalidate
public boolean invalidate()
-