Class HazelcastCache

java.lang.Object
com.hazelcast.spring.cache.HazelcastCache
All Implemented Interfaces:
org.springframework.cache.Cache

public class HazelcastCache extends Object implements org.springframework.cache.Cache
Spring related Cache implementation for Hazelcast.
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface org.springframework.cache.Cache
    • getNativeCache

      public IMap<Object,Object> getNativeCache()
      Specified by:
      getNativeCache in interface org.springframework.cache.Cache
    • get

      public org.springframework.cache.Cache.ValueWrapper get(Object key)
      Specified by:
      get in interface org.springframework.cache.Cache
    • get

      public <T> T get(Object key, Class<T> type)
      Specified by:
      get in interface org.springframework.cache.Cache
    • get

      public <T> T get(Object key, Callable<T> valueLoader)
      Specified by:
      get in interface org.springframework.cache.Cache
    • put

      public void put(Object key, Object value)
      Specified by:
      put in interface org.springframework.cache.Cache
    • toStoreValue

      protected Object toStoreValue(Object value)
    • fromStoreValue

      protected Object fromStoreValue(Object value)
    • evict

      public void evict(Object key)
      Specified by:
      evict in interface org.springframework.cache.Cache
    • clear

      public void clear()
      Specified by:
      clear in interface org.springframework.cache.Cache
    • putIfAbsent

      public org.springframework.cache.Cache.ValueWrapper putIfAbsent(Object key, Object value)
      Specified by:
      putIfAbsent in interface org.springframework.cache.Cache
    • setReadTimeout

      public void setReadTimeout(long readTimeout)
      Set cache value retrieval timeout
      Parameters:
      readTimeout - cache value retrieval timeout in milliseconds. 0 or negative values disable timeout
    • getReadTimeout

      public long getReadTimeout()
      Return cache retrieval timeout in milliseconds