Package com.hazelcast.spring.cache
Class HazelcastCache
java.lang.Object
com.hazelcast.spring.cache.HazelcastCache
- All Implemented Interfaces:
org.springframework.cache.Cache
public class HazelcastCache extends Object implements org.springframework.cache.Cache
Sprint related
Cache
implementation for Hazelcast.-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description HazelcastCache(IMap<Object,Object> map)
-
Method Summary
Modifier and Type Method Description void
clear()
void
evict(Object key)
protected Object
fromStoreValue(Object value)
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()
IMap<Object,Object>
getNativeCache()
long
getReadTimeout()
Return cache retrieval timeout in millisecondsvoid
put(Object key, Object value)
org.springframework.cache.Cache.ValueWrapper
putIfAbsent(Object key, Object value)
void
setReadTimeout(long readTimeout)
Set cache value retrieval timeoutprotected Object
toStoreValue(Object value)
-
Constructor Details
-
Method Details
-
getName
- Specified by:
getName
in interfaceorg.springframework.cache.Cache
-
getNativeCache
- Specified by:
getNativeCache
in interfaceorg.springframework.cache.Cache
-
get
- Specified by:
get
in interfaceorg.springframework.cache.Cache
-
get
- Specified by:
get
in interfaceorg.springframework.cache.Cache
-
get
- Specified by:
get
in interfaceorg.springframework.cache.Cache
-
put
- Specified by:
put
in interfaceorg.springframework.cache.Cache
-
toStoreValue
-
fromStoreValue
-
evict
- Specified by:
evict
in interfaceorg.springframework.cache.Cache
-
clear
public void clear()- Specified by:
clear
in interfaceorg.springframework.cache.Cache
-
putIfAbsent
- Specified by:
putIfAbsent
in interfaceorg.springframework.cache.Cache
-
setReadTimeout
public void setReadTimeout(long readTimeout)Set cache value retrieval timeout- Parameters:
readTimeout
- cache value retrieval timeout in milliseconds. 0 or negative values disable timeout
-
getReadTimeout
public long getReadTimeout()Return cache retrieval timeout in milliseconds
-