Modifier and Type | Method and Description |
---|---|
default R |
CircuitBreaker.execute(Task<R> task,
BreakStrategy<R> breakStrategy,
BreakHandler<R> breakHandler)
Executes the given
Callable only when given BreakStrategy allows the execution at the time of call. |
<U> R |
CircuitBreaker.execute(Task<R> task,
BreakStrategy<R> breakStrategy,
BreakHandler<R> breakHandler,
U userData)
Executes the given
Callable only when given BreakStrategy allows the execution at the time of call. |
R |
ContextAwareCircuitBreaker.executeInContext(Task<R> task,
BreakStrategy<R> breakStrategy,
BreakHandler<R> breakHandler,
ExecutionContext<R> executionContext)
Executes given task within given execution context.
|
Modifier and Type | Method and Description |
---|---|
R |
ReusableCircuitBreaker.execute(Task<R> task)
Executes given Task within this breaker using
BreakStrategy and BreakHandler given as the params. |
<U> R |
AbstractCircuitBreaker.execute(Task<R> task,
BreakStrategy<R> breakStrategy,
BreakHandler<R> breakHandler,
U userData) |
<U> R |
ReusableCircuitBreaker.execute(Task<R> task,
U userData)
Executes given Task within this breaker using
BreakStrategy and BreakHandler given as the params
with custom data passed as userData param. |
R |
AbstractCircuitBreaker.executeInContext(Task<R> task,
BreakStrategy<R> breakStrategy,
BreakHandler<R> breakHandler,
ExecutionContext<R> executionContext) |
Modifier and Type | Method and Description |
---|---|
default BreakHandler<R> |
OnePerExecutionHandlerFactory.makeHandler(Task<R> task,
ExecutionContext<R> executionContext) |
BreakHandler<R> |
BreakHandlerFactory.makeHandler(Task<R> task,
ExecutionContext<R> executionContext)
Returns an instance of
BreakHandler which should be used to handle the break. |
default R |
BreakHandlerFactory.onBreak(ContextAwareCircuitBreaker<R> circuitBreaker,
Task<R> task,
BreakStrategy<R> breakStrategy,
ExecutionContext<R> executionContext) |
R |
BreakHandler.onBreak(ContextAwareCircuitBreaker<R> circuitBreaker,
Task<R> task,
BreakStrategy<R> breakStrategy,
ExecutionContext<R> executionContext)
Handles situation when break occurs.
|
Modifier and Type | Method and Description |
---|---|
static <R,P> BreakHandler<R> |
InstantiationHelper.constructSingleParamInstance(Class<? extends BreakHandler> handlerClass,
P constructorParam)
Creates new instances of given
BreakHandler class. |
Modifier and Type | Class and Description |
---|---|
class |
RetryHandlerException |
Modifier and Type | Method and Description |
---|---|
R |
StatefulRetryHandler.onBreak(ContextAwareCircuitBreaker<R> circuitBreaker,
Task<R> task,
BreakStrategy<R> breakStrategy,
ExecutionContext<R> executionContext) |
R |
NoActionHandler.onBreak(ContextAwareCircuitBreaker<R> circuitBreaker,
Task<R> task,
BreakStrategy<R> breakStrategy,
ExecutionContext<R> executionContext) |
R |
ExceptionThrowingHandler.onBreak(ContextAwareCircuitBreaker<R> circuitBreaker,
Task<R> task,
BreakStrategy<R> breakStrategy,
ExecutionContext<R> executionContext) |
Constructor and Description |
---|
ExceptionThrowingHandler(Class<? extends BreakHandlerException> exceptionClass,
ExceptionThrowingHandlerMessageCallback<R> callback)
Constructs new instance of
ExceptionThrowingHandler which will throw exception of given class
with message obtained from given callback, in case "break" occurred (circuit breaker executed break handler
instead of real-method). |
ExceptionThrowingHandler(Class<? extends BreakHandlerException> exceptionClass,
String exceptionMessage)
Constructs new instance of
ExceptionThrowingHandler which will throw exception of given class
with given message in case "break" occurred (circuit breaker executed break handler instead of
real-method). |
Copyright © 2017. All rights reserved.