public class HazelcastCacheManager extends Object implements org.springframework.cache.CacheManager
HazelcastCacheManager
implementation for Hazelcast.Modifier and Type | Field and Description |
---|---|
static String |
CACHE_PROP
Property name for hazelcast spring-cache related properties.
|
Constructor and Description |
---|
HazelcastCacheManager() |
HazelcastCacheManager(HazelcastInstance hazelcastInstance) |
Modifier and Type | Method and Description |
---|---|
org.springframework.cache.Cache |
getCache(String name) |
Collection<String> |
getCacheNames() |
long |
getDefaultReadTimeout()
Return default cache value retrieval timeout in milliseconds.
|
HazelcastInstance |
getHazelcastInstance() |
Map<String,Long> |
getReadTimeoutMap()
Return cache-specific value retrieval timeouts.
|
void |
setCacheOptions(String options)
Set the cache ead-timeout params
|
void |
setDefaultReadTimeout(long defaultReadTimeout)
Set default cache value retrieval timeout.
|
void |
setHazelcastInstance(HazelcastInstance hazelcastInstance) |
public static final String CACHE_PROP
public HazelcastCacheManager()
public HazelcastCacheManager(HazelcastInstance hazelcastInstance)
public org.springframework.cache.Cache getCache(String name)
getCache
in interface org.springframework.cache.CacheManager
public Collection<String> getCacheNames()
getCacheNames
in interface org.springframework.cache.CacheManager
public HazelcastInstance getHazelcastInstance()
public void setHazelcastInstance(HazelcastInstance hazelcastInstance)
public long getDefaultReadTimeout()
public void setDefaultReadTimeout(long defaultReadTimeout)
defaultReadTimeout
- default cache retrieval timeout in milliseconds. 0 or negative values disable timeout.public Map<String,Long> getReadTimeoutMap()
@Autowired public void setCacheOptions(@Value(value="${hazelcast.spring.cache.prop:}") String options)
options
- cache read-timeout params, auto-wired by Spring automatically by getting value of
hazelcast.spring.cache.prop parameterCopyright © 2022 Hazelcast, Inc.. All rights reserved.