Package com.hazelcast.spring.cache
Class HazelcastCacheManager
java.lang.Object
com.hazelcast.spring.cache.HazelcastCacheManager
- All Implemented Interfaces:
org.springframework.cache.CacheManager
Spring-related
CacheManager
implementation for Hazelcast.-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Property name for hazelcast spring-cache related properties. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.cache.Cache
long
Return default cache value retrieval timeout in milliseconds.Return cache-specific value retrieval timeouts.void
setCacheOptions
(String options) Set the cache ead-timeout paramsvoid
setDefaultReadTimeout
(long defaultReadTimeout) Set default cache value retrieval timeout.void
setHazelcastInstance
(HazelcastInstance hazelcastInstance)
-
Field Details
-
CACHE_PROP
Property name for hazelcast spring-cache related properties.- See Also:
-
-
Constructor Details
-
HazelcastCacheManager
public HazelcastCacheManager() -
HazelcastCacheManager
-
-
Method Details
-
getCache
- Specified by:
getCache
in interfaceorg.springframework.cache.CacheManager
-
getCacheNames
- Specified by:
getCacheNames
in interfaceorg.springframework.cache.CacheManager
-
getHazelcastInstance
-
setHazelcastInstance
-
getDefaultReadTimeout
public long getDefaultReadTimeout()Return default cache value retrieval timeout in milliseconds. -
setDefaultReadTimeout
public void setDefaultReadTimeout(long defaultReadTimeout) Set default cache value retrieval timeout. Applies to all caches, if not defined a cache specific timeout.- Parameters:
defaultReadTimeout
- default cache retrieval timeout in milliseconds. 0 or negative values disable timeout.
-
getReadTimeoutMap
Return cache-specific value retrieval timeouts. Map keys are cache names, values are cache retrieval timeouts in milliseconds. -
setCacheOptions
Set the cache ead-timeout params- Parameters:
options
- cache read-timeout params, auto-wired by Spring automatically by getting value of hazelcast.spring.cache.prop parameter
-