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 |
---|---|
Task<R> |
ExecutedTask.getTask() |
Constructor and Description |
---|
ExecutedTask(Task<R> task,
long executionStartedTimestamp) |
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 |
---|---|
BreakHandler<R> |
OnePerExecutionHandlerFactory.createNewHandler(Task<R> task,
ExecutionContext<R> executionContext)
Constructs and returns new
BreakHandler . |
default String |
OnePerExecutionHandlerFactory.getOnePerExecutionContextParamName(Task<R> task,
ExecutionContext<R> executionContext)
Returns execution context parameter name under which produced break handler will be stored.
|
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 |
---|---|
String |
ExceptionThrowingHandlerMessageCallback.buildMessage(Task<R> task,
ExecutionContext<R> executionContext) |
protected String |
ExceptionThrowingHandler.buildMessage(Task<R> task,
ExecutionContext<R> executionContext) |
BreakHandler<R> |
ReusableRetryHandler.createNewHandler(Task<R> task,
ExecutionContext<R> executionContext) |
String |
ReusableRetryHandler.getOnePerExecutionContextParamName(Task<R> task,
ExecutionContext<R> executionContext) |
BreakHandler<R> |
SimpleHandlerFactory.makeHandler(Task<R> task,
ExecutionContext<R> executionContext) |
R |
StatefulRetryHandler.onBreak(ContextAwareCircuitBreaker<R> circuitBreaker,
Task<R> task,
BreakStrategy<R> breakStrategy,
ExecutionContext<R> executionContext) |
R |
ReturnStaticValueHandler.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) |
protected void |
StatefulRetryHandler.onRetry(int currentRetryAttempt,
Task<R> task,
ExecutionContext<R> executionContext) |
Modifier and Type | Method and Description |
---|---|
boolean |
BreakStrategy.shouldBreak(Task<R> task,
ExecutionContext<R> executionContext)
Returns true if "break" should happen, so that the Task (target-method) does not execute and circuit
breaker executes fallback break handler.
|
Modifier and Type | Method and Description |
---|---|
boolean |
LimitedCurrentAverageExecutionTimeStrategy.shouldBreak(Task<R> task,
ExecutionContext<R> executionContext) |
boolean |
LimitedConcurrentExecutionsStrategy.shouldBreak(Task<R> task,
ExecutionContext<R> executionContext) |
Modifier and Type | Method and Description |
---|---|
boolean |
DslOrStrategy.shouldBreak(Task<R> task,
ExecutionContext<R> executionContext) |
boolean |
DslAndStrategy.shouldBreak(Task<R> task,
ExecutionContext<R> executionContext) |
Modifier and Type | Interface and Description |
---|---|
interface |
VoidTask
Represents the java method that should be executed (called target-method in this context) which does not
return value.
|
Modifier and Type | Class and Description |
---|---|
class |
MethodInvokingTask<R,T>
Explicitly encapsulates and object and method of the object which should be executed by circuit breaker.
|
Copyright © 2017. All rights reserved.