Package org.infinispan.spring.provider
Class SpringCache
- java.lang.Object
-
- org.infinispan.spring.provider.SpringCache
-
- All Implemented Interfaces:
org.springframework.cache.Cache
public class SpringCache extends Object implements org.springframework.cache.Cache
A
implementation that delegates to aCache
instance supplied at construction time.org.infinispan.Cache
- Author:
- Olaf Bergner, Marius Bogoevici
-
-
Constructor Summary
Constructors Constructor Description SpringCache(BasicCache nativeCache)
SpringCache(BasicCache nativeCache, long readTimeout, long writeTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
void
evict(Object key)
org.springframework.cache.Cache.ValueWrapper
get(Object key)
<T> T
get(Object key, Class<T> type)
<T> T
get(Object key, Callable<T> valueLoader)
String
getName()
BasicCache<?,?>
getNativeCache()
void
put(Object key, Object value)
void
put(Object key, Object value, long lifespan, TimeUnit unit)
org.springframework.cache.Cache.ValueWrapper
putIfAbsent(Object key, Object value)
String
toString()
-
-
-
Constructor Detail
-
SpringCache
public SpringCache(BasicCache nativeCache)
- Parameters:
nativeCache
- underlying cache
-
SpringCache
public SpringCache(BasicCache nativeCache, long readTimeout, long writeTimeout)
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in interfaceorg.springframework.cache.Cache
- See Also:
Cache.getName()
-
getNativeCache
public BasicCache<?,?> getNativeCache()
- Specified by:
getNativeCache
in interfaceorg.springframework.cache.Cache
- See Also:
Cache.getNativeCache()
-
get
public org.springframework.cache.Cache.ValueWrapper get(Object key)
- Specified by:
get
in interfaceorg.springframework.cache.Cache
- See Also:
Cache.get(Object)
-
get
public <T> T get(Object key, Class<T> type)
- Specified by:
get
in interfaceorg.springframework.cache.Cache
-
get
public <T> T get(Object key, Callable<T> valueLoader)
- Specified by:
get
in interfaceorg.springframework.cache.Cache
-
put
public void put(Object key, Object value)
- Specified by:
put
in interfaceorg.springframework.cache.Cache
- See Also:
Cache.put(Object, Object)
-
putIfAbsent
public org.springframework.cache.Cache.ValueWrapper putIfAbsent(Object key, Object value)
- Specified by:
putIfAbsent
in interfaceorg.springframework.cache.Cache
-
evict
public void evict(Object key)
- Specified by:
evict
in interfaceorg.springframework.cache.Cache
- See Also:
Cache.evict(Object)
-
clear
public void clear()
- Specified by:
clear
in interfaceorg.springframework.cache.Cache
- See Also:
Cache.clear()
-
toString
public String toString()
- Overrides:
toString
in classObject
- See Also:
Object.toString()
-
-