@Documented @Retention(value=RUNTIME) @Target(value={METHOD,TYPE,ANNOTATION_TYPE}) @Retryable public @interface CircuitBreaker
Retryable that implements the Circuit Breaker pattern. Has higher overhead than
Retryable as a CircuitState has to be maintained for each method call| Modifier and Type | Fields and Description |
|---|---|
static int |
MAX_RETRY_ATTEMPTS |
| Modifier and Type | Optional Element and Description |
|---|---|
@Digits(integer=4,fraction=0) String |
attempts |
String |
delay |
Class<? extends Throwable>[] |
excludes |
Class<? extends Throwable>[] |
includes |
String |
maxDelay
The maximum overall delay for an operation to complete until the Circuit state is set to
CircuitState.OPEN. |
@Digits(integer=2,fraction=2) String |
multiplier |
Class<? extends RetryPredicate> |
predicate |
String |
reset
Sets the
Duration of time before resetting the circuit to
CircuitState.HALF_OPEN allowing a single retry. |
@AliasFor(annotation=Retryable.class, member="includes") public abstract Class<? extends Throwable>[] includes
@AliasFor(annotation=Retryable.class, member="excludes") public abstract Class<? extends Throwable>[] excludes
@AliasFor(annotation=Retryable.class, member="delay") public abstract String delay
@AliasFor(annotation=Retryable.class, member="maxDelay") public abstract String maxDelay
CircuitState.OPEN.public abstract String reset
Duration of time before resetting the circuit to
CircuitState.HALF_OPEN allowing a single retry.Duration of time before reset@AliasFor(annotation=Retryable.class, member="predicate") public abstract Class<? extends RetryPredicate> predicate
Retryable.includes() and Retryable.excludes()
(defaults to none)