public interface CacheExceptionHandler
onException
will be called. Of course, if the handler decides to throw the exception, it will
propagate up through the call stack. If the handler does not, it won't.
Some common Exceptions thrown, and which therefore should be considered when implementing this class are listed below:
IllegalStateException
if the cache is not Status.STATUS_ALIVE
IllegalArgumentException
if an attempt is made to put a null element into a cache
RemoteCacheException
if an issue occurs in remote synchronous replication
Modifier and Type | Method and Description |
---|---|
void |
onException(Ehcache ehcache,
Object key,
Exception exception)
Called if an Exception occurs in a Cache method.
|
void onException(Ehcache ehcache, Object key, Exception exception)
Error
occurs.ehcache
- the cache in which the Exception occurredkey
- the key used in the operation, or null if the operation does not use a key or the key was nullexception
- the Exception caught.Copyright © 2003–2016 Terracotta, Inc.. All rights reserved.