Package io.atlassian.fugue.retry
Class ExceptionHandlers
java.lang.Object
io.atlassian.fugue.retry.ExceptionHandlers
Provides some standard implementations of various exception actions.
This class is not instantiable.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static class(package private) static class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExceptionHandlerchain(ExceptionHandler... handlers) Chain a series of ExceptionHandlers together to be executed subsequently; if one throws an exception, subsequent handlers will not be executed.static ExceptionHandlerignoreExceptionHandler.(package private) static org.slf4j.Loggerlogger()static ExceptionHandlerloggingExceptionHandler(org.slf4j.Logger logger) Retrieves anExceptionHandlerwhich will log exceptions passed in.
-
Field Details
-
log
private static final org.slf4j.Logger log
-
-
Constructor Details
-
ExceptionHandlers
private ExceptionHandlers()
-
-
Method Details
-
loggingExceptionHandler
Retrieves anExceptionHandlerwhich will log exceptions passed in.- Parameters:
logger- the Logger to which exceptions will be logged; if it is null, a default Logger will be used. The default logger is the logger for the ExceptionHandlers class, but may change in future.- Returns:
- an
ExceptionHandlerwhich will log (at WARN level) exceptions passed in
-
ignoreExceptionHandler
ignoreExceptionHandler.
- Returns:
- an
ExceptionHandlerwhich does nothing
-
chain
Chain a series of ExceptionHandlers together to be executed subsequently; if one throws an exception, subsequent handlers will not be executed.- Parameters:
handlers- the chain ofhandlersto chain- Returns:
- an ExceptionHandler composing the supplied handlers
-
logger
static org.slf4j.Logger logger()
-