public final class HibernateNonstopCacheExceptionHandler
extends java.lang.Object
NonStopCacheException
that happens in hibernate moduleModifier and Type | Field and Description |
---|---|
static java.lang.String |
HIBERNATE_LOG_EXCEPTION_STACK_TRACE_PROPERTY
Property name for logging the stack trace of the nonstop cache exception too.
|
static java.lang.String |
HIBERNATE_THROW_EXCEPTION_ON_TIMEOUT_PROPERTY
Property name which set as "true" will throw exceptions on timeout with hibernate
|
private static HibernateNonstopCacheExceptionHandler |
INSTANCE |
private static org.slf4j.Logger |
LOGGER |
Modifier | Constructor and Description |
---|---|
private |
HibernateNonstopCacheExceptionHandler()
private constructor
|
Modifier and Type | Method and Description |
---|---|
static HibernateNonstopCacheExceptionHandler |
getInstance()
Returns the singleton instance
|
void |
handleNonstopCacheException(NonStopCacheException nonStopCacheException)
Handle
NonStopCacheException . |
public static final java.lang.String HIBERNATE_THROW_EXCEPTION_ON_TIMEOUT_PROPERTY
public static final java.lang.String HIBERNATE_LOG_EXCEPTION_STACK_TRACE_PROPERTY
private static final org.slf4j.Logger LOGGER
private static final HibernateNonstopCacheExceptionHandler INSTANCE
private HibernateNonstopCacheExceptionHandler()
public static HibernateNonstopCacheExceptionHandler getInstance()
public void handleNonstopCacheException(NonStopCacheException nonStopCacheException)
NonStopCacheException
.
If HIBERNATE_THROW_EXCEPTION_ON_TIMEOUT_PROPERTY
system property is set to true,
rethrows the NonStopCacheException
, otherwise logs the exception. While logging, if
HIBERNATE_LOG_EXCEPTION_STACK_TRACE_PROPERTY
is set to true, logs the exception stack
trace too, otherwise logs the exception message onlynonStopCacheException
-