Class HazelcastCacheManager

All Implemented Interfaces:

public class HazelcastCacheManager
extends Object
implements org.springframework.cache.CacheManager
Sprint related HazelcastCacheManager implementation for Hazelcast.
  • Field Details

  • Constructor Details

  • Method Details

    • getCache

      public org.springframework.cache.Cache getCache​(String name)
      Specified by:
      getCache in interface org.springframework.cache.CacheManager
    • getCacheNames

      public Collection<String> getCacheNames()
      Specified by:
      getCacheNames in interface org.springframework.cache.CacheManager
    • getHazelcastInstance

      public HazelcastInstance getHazelcastInstance()
    • setHazelcastInstance

      public void setHazelcastInstance​(HazelcastInstance hazelcastInstance)
    • 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.
      defaultReadTimeout - default cache retrieval timeout in milliseconds. 0 or negative values disable timeout.
    • getReadTimeoutMap

      public Map<String,​Long> getReadTimeoutMap()
      Return cache-specific value retrieval timeouts. Map keys are cache names, values are cache retrieval timeouts in milliseconds.
    • setCacheOptions

      @Autowired public void setCacheOptions​(@Value("${hazelcast.spring.cache.prop:}") String options)
      Set the cache ead-timeout params
      options - cache read-timeout params, auto-wired by Spring automatically by getting value of hazelcast.spring.cache.prop parameter