TimeoutHandler::onTimeout throws a checked exception if the implementation is unable to handle the timeout.
BatchEventProcessor::notifyTimeout catches Throwable, so no need for checked exception type.
The exception gets passed to the exception handler which may handle or bail out of the BatchEventProcessor::processEvents depending on the ExceptionHandler implementation.
This is leaning towards use of exceptions for control flow and perhaps we could look at returning something useful from TimeoutHandler::onTimeout instead?
TimeoutHandler::onTimeoutthrows a checked exception if the implementation is unable to handle the timeout.BatchEventProcessor::notifyTimeoutcatchesThrowable, so no need for checked exception type.The exception gets passed to the exception handler which may handle or bail out of the
BatchEventProcessor::processEventsdepending on theExceptionHandlerimplementation.This is leaning towards use of exceptions for control flow and perhaps we could look at returning something useful from
TimeoutHandler::onTimeoutinstead?