com.lmax.disruptor
Interface ExceptionHandler

All Known Implementing Classes:
FatalExceptionHandler, IgnoreExceptionHandler

public interface ExceptionHandler

Callback handler for uncaught exceptions in the event processing cycle of the BatchEventProcessor


Method Summary
 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 during LifecycleAware.onShutdown()
 void handleOnStartException(java.lang.Throwable ex)
          Callback to notify of an exception during LifecycleAware.onStart()
 

Method Detail

handleEventException

void handleEventException(java.lang.Throwable ex,
                          long sequence,
                          java.lang.Object event)
Strategy for handling uncaught exceptions when processing an event. If the strategy wishes to suspend further processing by the BatchEventProcessor then is should throw a RuntimeException.

Parameters:
ex - the exception that propagated from the EventHandler.
sequence - of the event which cause the exception.
event - being processed when the exception occurred.

handleOnStartException

void handleOnStartException(java.lang.Throwable ex)
Callback to notify of an exception during LifecycleAware.onStart()

Parameters:
ex - throw during the starting process.

handleOnShutdownException

void handleOnShutdownException(java.lang.Throwable ex)
Callback to notify of an exception during LifecycleAware.onShutdown()

Parameters:
ex - throw during the shutdown process.


Copyright © 2011 LMAX Ltd. All Rights Reserved.