Package com.lmax.disruptor
Interface ExceptionHandler<T>
- All Known Implementing Classes:
ExceptionHandlerWrapper
,FatalExceptionHandler
,IgnoreExceptionHandler
public interface ExceptionHandler<T>
Callback handler for uncaught exceptions in the event processing cycle of the
BatchEventProcessor
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleEventException
(Throwable ex, long sequence, T event) Strategy for handling uncaught exceptions when processing an event.void
Callback to notify of an exception duringLifecycleAware.onShutdown()
void
Callback to notify of an exception duringLifecycleAware.onStart()
-
Method Details
-
handleEventException
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
.- 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
Callback to notify of an exception duringLifecycleAware.onStart()
- Parameters:
ex
- throw during the starting process.
-
handleOnShutdownException
Callback to notify of an exception duringLifecycleAware.onShutdown()
- Parameters:
ex
- throw during the shutdown process.
-