public class JCacheCache extends Object implements org.springframework.cache.Cache
Cache implementation on top of a
Cache instance.| Constructor and Description |
|---|
JCacheCache(javax.cache.Cache<?,?> jcache)
Create an
JCacheCache instance. |
JCacheCache(javax.cache.Cache<?,?> jcache,
boolean allowNullValues)
Create an
JCacheCache instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
evict(Object key) |
protected Object |
fromStoreValue(Object storeValue)
Convert the given value from the internal store to a user value
returned from the get method (adapting
null). |
org.springframework.cache.Cache.ValueWrapper |
get(Object key) |
String |
getName() |
javax.cache.Cache<?,?> |
getNativeCache() |
boolean |
isAllowNullValues() |
void |
put(Object key,
Object value) |
protected Object |
toStoreValue(Object userValue)
Convert the given user value, as passed into the put method,
to a value in the internal store (adapting
null). |
public JCacheCache(javax.cache.Cache<?,?> jcache)
JCacheCache instance.jcache - backing JCache Cache instancepublic JCacheCache(javax.cache.Cache<?,?> jcache,
boolean allowNullValues)
JCacheCache instance.jcache - backing JCache Cache instanceallowNullValues - whether to accept and convert null values for this cachepublic String getName()
getName in interface org.springframework.cache.Cachepublic javax.cache.Cache<?,?> getNativeCache()
getNativeCache in interface org.springframework.cache.Cachepublic boolean isAllowNullValues()
public org.springframework.cache.Cache.ValueWrapper get(Object key)
get in interface org.springframework.cache.Cachepublic void put(Object key, Object value)
put in interface org.springframework.cache.Cachepublic void evict(Object key)
evict in interface org.springframework.cache.Cachepublic void clear()
clear in interface org.springframework.cache.Cacheprotected Object fromStoreValue(Object storeValue)
null).storeValue - the store value