Package com.lmax.disruptor
Class FatalExceptionHandler
java.lang.Object
com.lmax.disruptor.FatalExceptionHandler
- All Implemented Interfaces:
ExceptionHandler<Object>
Convenience implementation of an exception handler that using standard JDK logging to log
the exception as
Level.SEVERE and re-throw it wrapped in a RuntimeException-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleEventException(Throwable ex, long sequence, Object event) Strategy for handling uncaught exceptions when processing an event.voidCallback to notify of an exception duringLifecycleAware.onShutdown()voidCallback to notify of an exception duringLifecycleAware.onStart()
-
Field Details
-
LOGGER
-
logger
-
-
Constructor Details
-
FatalExceptionHandler
public FatalExceptionHandler() -
FatalExceptionHandler
-
-
Method Details
-
handleEventException
Description copied from interface:ExceptionHandlerStrategy for handling uncaught exceptions when processing an event.
If the strategy wishes to terminate further processing by the
BatchEventProcessorthen it should throw aRuntimeException.- Specified by:
handleEventExceptionin interfaceExceptionHandler<Object>- Parameters:
ex- the exception that propagated from theEventHandler.sequence- of the event which cause the exception.event- being processed when the exception occurred. This can be null.
-
handleOnStartException
Description copied from interface:ExceptionHandlerCallback to notify of an exception duringLifecycleAware.onStart()- Specified by:
handleOnStartExceptionin interfaceExceptionHandler<Object>- Parameters:
ex- throw during the starting process.
-
handleOnShutdownException
Description copied from interface:ExceptionHandlerCallback to notify of an exception duringLifecycleAware.onShutdown()- Specified by:
handleOnShutdownExceptionin interfaceExceptionHandler<Object>- Parameters:
ex- throw during the shutdown process.
-