public class EhCacheCache extends Object implements org.springframework.cache.Cache
Cache implementation on top of an Ehcache instance.EhCacheCacheManager| Constructor and Description |
|---|
EhCacheCache(Ehcache ehcache)
Create an
EhCacheCache instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
evict(Object key) |
boolean |
evictIfPresent(Object key) |
org.springframework.cache.Cache.ValueWrapper |
get(Object key) |
<T> T |
get(Object key,
Callable<T> valueLoader) |
<T> T |
get(Object key,
Class<T> type) |
String |
getName() |
Ehcache |
getNativeCache() |
boolean |
invalidate() |
void |
put(Object key,
Object value) |
org.springframework.cache.Cache.ValueWrapper |
putIfAbsent(Object key,
Object value) |
public EhCacheCache(Ehcache ehcache)
EhCacheCache instance.ehcache - the backing Ehcache instancepublic final String getName()
getName in interface org.springframework.cache.Cachepublic final Ehcache getNativeCache()
getNativeCache in interface org.springframework.cache.Cache@Nullable public org.springframework.cache.Cache.ValueWrapper get(Object key)
get in interface org.springframework.cache.Cache@Nullable public <T> T get(Object key, @Nullable Class<T> type)
get in interface org.springframework.cache.Cache@Nullable public <T> T get(Object key, Callable<T> valueLoader)
get in interface org.springframework.cache.Cachepublic void put(Object key, @Nullable Object value)
put in interface org.springframework.cache.Cache@Nullable public org.springframework.cache.Cache.ValueWrapper putIfAbsent(Object key, @Nullable Object value)
putIfAbsent in interface org.springframework.cache.Cachepublic void evict(Object key)
evict in interface org.springframework.cache.Cachepublic boolean evictIfPresent(Object key)
evictIfPresent in interface org.springframework.cache.Cachepublic void clear()
clear in interface org.springframework.cache.Cachepublic boolean invalidate()
invalidate in interface org.springframework.cache.Cache