Package io.micronaut.cache
Class AsyncCacheErrorHandler
java.lang.Object
io.micronaut.cache.AsyncCacheErrorHandler
- All Implemented Interfaces:
 CacheErrorHandler
@Singleton
@Named("async")
public class AsyncCacheErrorHandler
extends Object
implements CacheErrorHandler
Async error handler that simply logs errors.
- Since:
 - 1.0
 - Author:
 - Graeme Rocher
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleanhandleInvalidateError(Cache<?> cache, Object key, RuntimeException e) Handles a cacheCacheInvalidateerror.booleanhandleInvalidateError(Cache<?> cache, RuntimeException e) Handles a cacheCacheInvalidateerror.booleanhandlePutError(Cache<?> cache, Object key, Object result, RuntimeException e) Handles a cacheCachePuterror.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.cache.CacheErrorHandler
handleLoadError 
- 
Constructor Details
- 
AsyncCacheErrorHandler
public AsyncCacheErrorHandler() 
 - 
 - 
Method Details
- 
handleInvalidateError
Description copied from interface:CacheErrorHandlerHandles a cacheCacheInvalidateerror. Defaults to simply rethrowing the error. By returningfalsecache invalidate errors will instead to be swallowed and ignored.- Specified by:
 handleInvalidateErrorin interfaceCacheErrorHandler- Parameters:
 cache- The cachekey- The keye- The error- Returns:
 - Whether the exception should be swallowed or rethrown. A value of true will rethrow he exception.
 
 - 
handleInvalidateError
Description copied from interface:CacheErrorHandlerHandles a cacheCacheInvalidateerror. Defaults to simply rethrowing the error. By returningfalsecache invalidate errors will instead to be swallowed and ignored.- Specified by:
 handleInvalidateErrorin interfaceCacheErrorHandler- Parameters:
 cache- The cachee- The error- Returns:
 - Whether the exception should be swallowed or rethrown. A value of true will rethrow he exception.
 
 - 
handlePutError
Description copied from interface:CacheErrorHandlerHandles a cacheCachePuterror. Defaults to simply rethrowing the error. By returningfalsecache write errors will instead to be swallowed and ignored.- Specified by:
 handlePutErrorin interfaceCacheErrorHandler- Parameters:
 cache- The cachekey- The key nameresult- The resulte- The error- Returns:
 - Whether the exception should be swallowed or rethrown. A value of true will rethrow he exception.
 
 
 -