com.lmax.disruptor
Class FatalExceptionHandler

java.lang.Object
  extended by com.lmax.disruptor.FatalExceptionHandler
All Implemented Interfaces:
ExceptionHandler

public final class FatalExceptionHandler
extends java.lang.Object
implements ExceptionHandler

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


Constructor Summary
FatalExceptionHandler()
           
FatalExceptionHandler(java.util.logging.Logger logger)
           
 
Method Summary
 void handle(java.lang.Exception ex, AbstractEntry currentEntry)
          Strategy for handling uncaught exceptions when processing an AbstractEntry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FatalExceptionHandler

public FatalExceptionHandler()

FatalExceptionHandler

public FatalExceptionHandler(java.util.logging.Logger logger)
Method Detail

handle

public void handle(java.lang.Exception ex,
                   AbstractEntry currentEntry)
Description copied from interface: ExceptionHandler
Strategy for handling uncaught exceptions when processing an AbstractEntry. If the strategy wishes to suspend further processing by the BatchConsumer then is should throw a RuntimeException.

Specified by:
handle in interface ExceptionHandler
Parameters:
ex - the exception that propagated from the BatchHandler
currentEntry - being processed when the exception occurred.


Copyright © 2011 LMAX Ltd. All Rights Reserved.