Class SimpleCacheErrorHandler
- java.lang.Object
- org.springframework.cache.interceptor.SimpleCacheErrorHandler
- All Implemented Interfaces:
CacheErrorHandler
public class SimpleCacheErrorHandler extends Object implements CacheErrorHandler
A simpleCacheErrorHandler
that does not handle the exception at all, simply throwing it back at the client.- Since:
- 4.1
- Author:
- Stephane Nicoll
Constructor Summary
Constructors Constructor Description SimpleCacheErrorHandler()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleCacheClearError(RuntimeException exception, Cache cache)
Handle the given runtime exception thrown by the cache provider when clearing the specifiedCache
, possibly rethrowing it as a fatal exception.void
handleCacheEvictError(RuntimeException exception, Cache cache, Object key)
Handle the given runtime exception thrown by the cache provider when clearing an item with the specifiedkey
, possibly rethrowing it as a fatal exception.void
handleCacheGetError(RuntimeException exception, Cache cache, Object key)
Handle the given runtime exception thrown by the cache provider when retrieving an item with the specifiedkey
, possibly rethrowing it as a fatal exception.void
handleCachePutError(RuntimeException exception, Cache cache, Object key, Object value)
Handle the given runtime exception thrown by the cache provider when updating an item with the specifiedkey
andvalue
, possibly rethrowing it as a fatal exception.
Constructor Detail
SimpleCacheErrorHandler
public SimpleCacheErrorHandler()
Method Detail
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 specifiedkey
, possibly rethrowing it as a fatal exception.- Specified by:
handleCacheGetError
in interfaceCacheErrorHandler
- Parameters:
exception
- the exception thrown by the cache providercache
- the cachekey
- the key used to get the item- See Also:
Cache.get(Object)
handleCachePutError
public void handleCachePutError(RuntimeException exception, Cache cache, Object key, Object value)
Description copied from interface:CacheErrorHandler
Handle the given runtime exception thrown by the cache provider when updating an item with the specifiedkey
andvalue
, possibly rethrowing it as a fatal exception.- Specified by:
handleCachePutError
in interfaceCacheErrorHandler
- Parameters:
exception
- the exception thrown by the cache providercache
- the cachekey
- the key used to update the itemvalue
- the value to associate with the key- See Also:
Cache.put(Object, Object)
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 specifiedkey
, possibly rethrowing it as a fatal exception.- Specified by:
handleCacheEvictError
in interfaceCacheErrorHandler
- Parameters:
exception
- the exception thrown by the cache providercache
- the cachekey
- 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 specifiedCache
, possibly rethrowing it as a fatal exception.- Specified by:
handleCacheClearError
in interfaceCacheErrorHandler
- Parameters:
exception
- the exception thrown by the cache providercache
- the cache to clear