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
ConstructorsConstructorDescriptionJCacheCache(javax.cache.Cache<Object, Object> jcache) Create aJCacheCacheinstance.JCacheCache(javax.cache.Cache<Object, Object> jcache, boolean allowNullValues) Create aJCacheCacheinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidbooleanevictIfPresent(Object key) <T> Tfinal StringgetName()booleanprotected Objectvoidorg.springframework.cache.Cache.ValueWrapperputIfAbsent(Object key, Object value) Methods inherited from class org.springframework.cache.support.AbstractValueAdaptingCache
fromStoreValue, get, get, isAllowNullValues, toStoreValue, toValueWrapper
-
Constructor Details
-
JCacheCache
Create aJCacheCacheinstance.- Parameters:
jcache- backing JCache Cache instance
-
JCacheCache
Create aJCacheCacheinstance.- Parameters:
jcache- backing JCache Cache instanceallowNullValues- whether to accept and convert null values for this cache
-
-
Method Details
-
getName
-
getNativeCache
-
lookup
- Specified by:
lookupin classorg.springframework.cache.support.AbstractValueAdaptingCache
-
get
-
put
-
putIfAbsent
-
evict
-
evictIfPresent
-
clear
public void clear() -
invalidate
public boolean invalidate()
-