/** * <p>Specify an exception handler to be used for event handlers and worker pools created by this Disruptor.</p> * * <p>The exception handler will be used by existing and future event handlers and worker pools created by this Disruptor instance.</p> * * @param exceptionHandler the exception handler to use. */ @SuppressWarnings("unchecked") public void setDefaultExceptionHandler(final ExceptionHandler<? super T> exceptionHandler) { checkNotStarted(); if (!(this.exceptionHandler instanceof ExceptionHandlerWrapper)) { throw new IllegalStateException("setDefaultExceptionHandler can not be used after handleExceptionsWith"); } ((ExceptionHandlerWrapper<T>)this.exceptionHandler).switchTo(exceptionHandler); }
/** * <p>Specify an exception handler to be used for event handlers and worker pools created by this Disruptor.</p> * * <p>The exception handler will be used by existing and future event handlers and worker pools created by this Disruptor instance.</p> * * @param exceptionHandler the exception handler to use. */ @SuppressWarnings("unchecked") public void setDefaultExceptionHandler(final ExceptionHandler<? super T> exceptionHandler) { checkNotStarted(); if (!(this.exceptionHandler instanceof ExceptionHandlerWrapper)) { throw new IllegalStateException("setDefaultExceptionHandler can not be used after handleExceptionsWith"); } ((ExceptionHandlerWrapper<T>)this.exceptionHandler).switchTo(exceptionHandler); }
/** * <p>Specify an exception handler to be used for event handlers and worker pools created by this Disruptor.</p> * <p> * <p>The exception handler will be used by existing and future event handlers and worker pools created by this Disruptor instance.</p> * * @param exceptionHandler the exception handler to use. */ @SuppressWarnings("unchecked") public void setDefaultExceptionHandler(final ExceptionHandler<? super T> exceptionHandler) { checkNotStarted(); if (!(this.exceptionHandler instanceof ExceptionHandlerWrapper)) { throw new IllegalStateException("setDefaultExceptionHandler can not be used after handleExceptionsWith"); } ((ExceptionHandlerWrapper<T>)this.exceptionHandler).switchTo(exceptionHandler); }
/** * <p>Specify an exception handler to be used for event handlers and worker pools created by this Disruptor.</p> * * <p>The exception handler will be used by existing and future event handlers and worker pools created by this Disruptor instance.</p> * * @param exceptionHandler the exception handler to use. */ @SuppressWarnings("unchecked") public void setDefaultExceptionHandler(final ExceptionHandler<? super T> exceptionHandler) { checkNotStarted(); if (!(this.exceptionHandler instanceof ExceptionHandlerWrapper)) { throw new IllegalStateException("setDefaultExceptionHandler can not be used after handleExceptionsWith"); } ((ExceptionHandlerWrapper<T>)this.exceptionHandler).switchTo(exceptionHandler); }