public class DslOrStrategy<R> extends Object implements BreakStrategy<R>
Constructor and Description |
---|
DslOrStrategy(BreakStrategy<R> strategyA,
BreakStrategy<R> strategyB) |
Modifier and Type | Method and Description |
---|---|
boolean |
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.
|
public DslOrStrategy(BreakStrategy<R> strategyA, BreakStrategy<R> strategyB)
public boolean shouldBreak(Task<R> task, ExecutionContext<R> executionContext)
BreakStrategy
shouldBreak
in interface BreakStrategy<R>
task
- the task for execution of which this break strategy was calledexecutionContext
- current execution contextCopyright © 2017. All rights reserved.