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
FieldsModifier and TypeFieldDescriptionstatic final StringProperty name for hazelcast spring-cache related properties. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.cache.CachelongReturn default cache value retrieval timeout in milliseconds.Return cache-specific value retrieval timeouts.voidsetCacheOptions(String options) Set the cache ead-timeout paramsvoidsetDefaultReadTimeout(long defaultReadTimeout) Set default cache value retrieval timeout.voidsetHazelcastInstance(HazelcastInstance hazelcastInstance) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.cache.CacheManager
resetCaches
-
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:
getCachein interfaceorg.springframework.cache.CacheManager
-
getCacheNames
- Specified by:
getCacheNamesin 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
-