- java.lang.Object
-
- com.lmax.disruptor.FatalExceptionHandler
-
- All Implemented Interfaces:
ExceptionHandler<java.lang.Object>
public final class FatalExceptionHandler extends java.lang.Object implements ExceptionHandler<java.lang.Object>
Convenience implementation of an exception handler that uses the standard JDK logging ofSystem.Logger
to log the exception asSystem.Logger.Level
.ERROR and re-throw it wrapped in aRuntimeException
-
-
Constructor Summary
Constructors Constructor Description FatalExceptionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleEventException(java.lang.Throwable ex, long sequence, java.lang.Object event)
Strategy for handling uncaught exceptions when processing an event.void
handleOnShutdownException(java.lang.Throwable ex)
Callback to notify of an exception duringEventHandlerBase.onShutdown()
void
handleOnStartException(java.lang.Throwable ex)
Callback to notify of an exception duringEventHandlerBase.onStart()
-
-
-
Method Detail
-
handleEventException
public void handleEventException(java.lang.Throwable ex, long sequence, java.lang.Object event)
Description copied from interface:ExceptionHandler
Strategy for handling uncaught exceptions when processing an event.
If the strategy wishes to terminate further processing by the
BatchEventProcessor
then it should throw aRuntimeException
.- Specified by:
handleEventException
in interfaceExceptionHandler<java.lang.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
public void handleOnStartException(java.lang.Throwable ex)
Description copied from interface:ExceptionHandler
Callback to notify of an exception duringEventHandlerBase.onStart()
- Specified by:
handleOnStartException
in interfaceExceptionHandler<java.lang.Object>
- Parameters:
ex
- throw during the starting process.
-
handleOnShutdownException
public void handleOnShutdownException(java.lang.Throwable ex)
Description copied from interface:ExceptionHandler
Callback to notify of an exception duringEventHandlerBase.onShutdown()
- Specified by:
handleOnShutdownException
in interfaceExceptionHandler<java.lang.Object>
- Parameters:
ex
- throw during the shutdown process.
-
-