@Documented
@Retention(value=RUNTIME)
@Target(value={METHOD,TYPE,ANNOTATION_TYPE})
@Around
@Type(value=DefaultRetryInterceptor.class)
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) java.lang.String |
attempts |
java.lang.String |
delay |
java.lang.Class<? extends java.lang.Throwable>[] |
excludes |
java.lang.Class<? extends java.lang.Throwable>[] |
includes |
java.lang.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) java.lang.String |
multiplier |
java.lang.Class<? extends RetryPredicate> |
predicate |
java.lang.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 java.lang.Class<? extends java.lang.Throwable>[] includes
@AliasFor(annotation=Retryable.class, member="excludes") public abstract java.lang.Class<? extends java.lang.Throwable>[] excludes
@Digits(integer=4,
fraction=0)
@AliasFor(annotation=Retryable.class,
member="attempts")
public abstract @Digits(integer=4,fraction=0) java.lang.String attempts
@AliasFor(annotation=Retryable.class, member="delay") public abstract java.lang.String delay
@Digits(integer=2,
fraction=2)
@AliasFor(annotation=Retryable.class,
member="multiplier")
public abstract @Digits(integer=2,fraction=2) java.lang.String multiplier
@AliasFor(annotation=Retryable.class, member="maxDelay") public abstract java.lang.String maxDelay
CircuitState.OPEN.public abstract java.lang.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 java.lang.Class<? extends RetryPredicate> predicate
Retryable.includes() and Retryable.excludes()
(defaults to none)