public class HazelcastCache extends Object implements org.springframework.cache.Cache
Cache implementation for Hazelcast.| Constructor and Description |
|---|
HazelcastCache(IMap<Object,Object> map) |
| Modifier and Type | Method and 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,
Callable<T> valueLoader) |
<T> T |
get(Object key,
Class<T> type) |
String |
getName() |
IMap<Object,Object> |
getNativeCache() |
long |
getReadTimeout()
Return cache retrieval timeout in milliseconds
|
void |
put(Object key,
Object value) |
org.springframework.cache.Cache.ValueWrapper |
putIfAbsent(Object key,
Object value) |
void |
setReadTimeout(long readTimeout)
Set cache value retrieval timeout
|
protected Object |
toStoreValue(Object value) |
public String getName()
getName in interface org.springframework.cache.Cachepublic IMap<Object,Object> getNativeCache()
getNativeCache in interface org.springframework.cache.Cachepublic org.springframework.cache.Cache.ValueWrapper get(Object key)
get in interface org.springframework.cache.Cachepublic <T> T get(Object key, Class<T> type)
get in interface org.springframework.cache.Cachepublic <T> T get(Object key, Callable<T> valueLoader)
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.Cachepublic org.springframework.cache.Cache.ValueWrapper putIfAbsent(Object key, Object value)
putIfAbsent in interface org.springframework.cache.Cachepublic void setReadTimeout(long readTimeout)
readTimeout - cache value retrieval timeout in milliseconds. 0 or negative values disable timeoutpublic long getReadTimeout()
Copyright © 2021 Hazelcast, Inc.. All rights reserved.