Class CouchbaseCache

java.lang.Object
org.springframework.cache.support.AbstractValueAdaptingCache
org.springframework.data.couchbase.cache.CouchbaseCache
All Implemented Interfaces:
org.springframework.cache.Cache

public class CouchbaseCache extends org.springframework.cache.support.AbstractValueAdaptingCache
  • Constructor Details

  • Method Details

    • getName

      public String getName()
    • getNativeCache

      public CouchbaseCacheWriter getNativeCache()
    • lookup

      protected Object lookup(Object key)
      Specified by:
      lookup in class org.springframework.cache.support.AbstractValueAdaptingCache
    • getCacheConfiguration

      public CouchbaseCacheConfiguration getCacheConfiguration()
      Returns the configuration for this CouchbaseCache.
    • get

      public <T> T get(Object key, Callable<T> valueLoader)
    • put

      public void put(Object key, Object value)
    • putIfAbsent

      public org.springframework.cache.Cache.ValueWrapper putIfAbsent(Object key, Object value)
    • evict

      public void evict(Object key)
    • evictIfPresent

      public boolean evictIfPresent(Object key)
    • invalidate

      public boolean invalidate()
    • clear

      public void clear()
    • createCacheKey

      protected String createCacheKey(Object key)
      Customization hook for creating cache key before it gets serialized.
      Parameters:
      key - will never be null.
      Returns:
      never null.
    • convertKey

      protected String convertKey(Object key)
      Convert key to a String representation used for cache key creation.
      Parameters:
      key - will never be null.
      Returns:
      never null.
      Throws:
      IllegalStateException - if key cannot be converted to String.