Class SimpleCacheErrorHandler

java.lang.Object
org.springframework.cache.interceptor.SimpleCacheErrorHandler
All Implemented Interfaces:
CacheErrorHandler

public class SimpleCacheErrorHandler extends Object implements CacheErrorHandler
A simple CacheErrorHandler that does not handle the exception at all, simply throwing it back at the client.
Since:
4.1
Author:
Stephane Nicoll
  • Constructor Details

    • SimpleCacheErrorHandler

      public SimpleCacheErrorHandler()
  • Method Details

    • handleCacheGetError

      public void handleCacheGetError(RuntimeException exception, Cache cache, Object key)
      Description copied from interface: CacheErrorHandler
      Handle the given runtime exception thrown by the cache provider when retrieving an item with the specified key, possibly rethrowing it as a fatal exception.
      Specified by:
      handleCacheGetError in interface CacheErrorHandler
      Parameters:
      exception - the exception thrown by the cache provider
      cache - the cache
      key - the key used to get the item
      See Also:
    • handleCachePutError

      public void handleCachePutError(RuntimeException exception, Cache cache, Object key, @Nullable Object value)
      Description copied from interface: CacheErrorHandler
      Handle the given runtime exception thrown by the cache provider when updating an item with the specified key and value, possibly rethrowing it as a fatal exception.
      Specified by:
      handleCachePutError in interface CacheErrorHandler
      Parameters:
      exception - the exception thrown by the cache provider
      cache - the cache
      key - the key used to update the item
      value - the value to associate with the key
      See Also:
    • handleCacheEvictError

      public void handleCacheEvictError(RuntimeException exception, Cache cache, Object key)
      Description copied from interface: CacheErrorHandler
      Handle the given runtime exception thrown by the cache provider when clearing an item with the specified key, possibly rethrowing it as a fatal exception.
      Specified by:
      handleCacheEvictError in interface CacheErrorHandler
      Parameters:
      exception - the exception thrown by the cache provider
      cache - the cache
      key - the key used to clear the item
    • handleCacheClearError

      public void handleCacheClearError(RuntimeException exception, Cache cache)
      Description copied from interface: CacheErrorHandler
      Handle the given runtime exception thrown by the cache provider when clearing the specified Cache, possibly rethrowing it as a fatal exception.
      Specified by:
      handleCacheClearError in interface CacheErrorHandler
      Parameters:
      exception - the exception thrown by the cache provider
      cache - the cache to clear