- java.lang.Object
-
- com.lmax.disruptor.dsl.ExceptionHandlerWrapper<T>
-
- Type Parameters:
T- The data type of the underlyingRingBuffer
- All Implemented Interfaces:
ExceptionHandler<T>
public class ExceptionHandlerWrapper<T> extends java.lang.Object implements ExceptionHandler<T>
A mutable exception handler wrapper
-
-
Constructor Summary
Constructors Constructor Description ExceptionHandlerWrapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleEventException(java.lang.Throwable ex, long sequence, T event)Strategy for handling uncaught exceptions when processing an event.voidhandleOnShutdownException(java.lang.Throwable ex)Callback to notify of an exception duringEventHandlerBase.onShutdown()voidhandleOnStartException(java.lang.Throwable ex)Callback to notify of an exception duringEventHandlerBase.onStart()voidswitchTo(ExceptionHandler<? super T> exceptionHandler)Switch to a different exception handler
-
-
-
Method Detail
-
switchTo
public void switchTo(ExceptionHandler<? super T> exceptionHandler)
Switch to a different exception handler- Parameters:
exceptionHandler- the exception handler to use from now on
-
handleEventException
public void handleEventException(java.lang.Throwable ex, long sequence, T event)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<T>- 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:ExceptionHandlerCallback to notify of an exception duringEventHandlerBase.onStart()- Specified by:
handleOnStartExceptionin interfaceExceptionHandler<T>- Parameters:
ex- throw during the starting process.
-
handleOnShutdownException
public void handleOnShutdownException(java.lang.Throwable ex)
Description copied from interface:ExceptionHandlerCallback to notify of an exception duringEventHandlerBase.onShutdown()- Specified by:
handleOnShutdownExceptionin interfaceExceptionHandler<T>- Parameters:
ex- throw during the shutdown process.
-
-