@FunctionalInterface public interface FaultToleranceConfig
Config
so
that the processing can be declared independent of the actual resolution mechanism.
A configuration is bound to a specific invocation context which is not an argument to each of the provided methods
but passed to the implementation upon construction. For another invocation another configuration instance is bound.Modifier and Type | Field and Description |
---|---|
static String |
ALTERNATIVE_ASYNCHRONOUS_ANNNOTATIONS_PROPERTY
A payara specific feature that allows to specify a list of annotation classes that have a similar effect as
Asynchronous . |
static Class<? extends Annotation>[] |
NO_ALTERNATIVE_ANNOTATIONS |
Modifier and Type | Method and Description |
---|---|
default Class<? extends Throwable>[] |
abortOn(org.eclipse.microprofile.faulttolerance.Retry annotation) |
static FaultToleranceConfig |
asAnnotated(Class<?> target,
Method method) |
default long |
delay(org.eclipse.microprofile.faulttolerance.CircuitBreaker annotation) |
default long |
delay(org.eclipse.microprofile.faulttolerance.Retry annotation) |
default ChronoUnit |
delayUnit(org.eclipse.microprofile.faulttolerance.CircuitBreaker annotation) |
default ChronoUnit |
delayUnit(org.eclipse.microprofile.faulttolerance.Retry annotation) |
default ChronoUnit |
durationUnit(org.eclipse.microprofile.faulttolerance.Retry annotation) |
default Class<? extends Throwable>[] |
failOn(org.eclipse.microprofile.faulttolerance.CircuitBreaker annotation) |
default double |
failureRatio(org.eclipse.microprofile.faulttolerance.CircuitBreaker annotation) |
default String |
fallbackMethod(org.eclipse.microprofile.faulttolerance.Fallback annotation) |
<A extends Annotation> |
getAnnotation(Class<A> annotationType)
Returns the value of the given annotation type for the invocation context was bound to upon construction.
|
default boolean |
isAlternativeAsynchronousAnnoationPresent() |
default boolean |
isAnnotationPresent(Class<? extends Annotation> annotationType) |
default boolean |
isEnabled(Class<? extends Annotation> annotationType)
Check global annotation specific annotation switch.
|
default boolean |
isMetricsEnabled()
Check for global metrics switch.
|
default boolean |
isNonFallbackEnabled()
Check global generic annotation switch.
|
default long |
jitter(org.eclipse.microprofile.faulttolerance.Retry annotation) |
default ChronoUnit |
jitterDelayUnit(org.eclipse.microprofile.faulttolerance.Retry annotation) |
default long |
maxDuration(org.eclipse.microprofile.faulttolerance.Retry annotation) |
default int |
maxRetries(org.eclipse.microprofile.faulttolerance.Retry annotation) |
default int |
requestVolumeThreshold(org.eclipse.microprofile.faulttolerance.CircuitBreaker annotation) |
default Class<? extends Throwable>[] |
retryOn(org.eclipse.microprofile.faulttolerance.Retry annotation) |
default int |
successThreshold(org.eclipse.microprofile.faulttolerance.CircuitBreaker annotation) |
default ChronoUnit |
unit(org.eclipse.microprofile.faulttolerance.Timeout annotation) |
default int |
value(org.eclipse.microprofile.faulttolerance.Bulkhead annotation) |
default Class<? extends org.eclipse.microprofile.faulttolerance.FallbackHandler<?>> |
value(org.eclipse.microprofile.faulttolerance.Fallback annotation) |
default long |
value(org.eclipse.microprofile.faulttolerance.Timeout annotation) |
default int |
waitingTaskQueue(org.eclipse.microprofile.faulttolerance.Bulkhead annotation) |
static final String ALTERNATIVE_ASYNCHRONOUS_ANNNOTATIONS_PROPERTY
Asynchronous
.static final Class<? extends Annotation>[] NO_ALTERNATIVE_ANNOTATIONS
static FaultToleranceConfig asAnnotated(Class<?> target, Method method)
FaultToleranceConfig
that behaves as stated by the present FT annotations. Method
annotations take precedence over the Class
level annotations.<A extends Annotation> A getAnnotation(Class<A> annotationType)
annotationType
- type to lookupnull
otherwisedefault boolean isNonFallbackEnabled()
Fallback
, which is always enabled) the other FT annotations are as well
(default). Mostly used to disable these which will not disable Fallback
.default boolean isEnabled(Class<? extends Annotation> annotationType)
annotationType
- the annotation type to checkdefault boolean isMetricsEnabled()
default boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
getAnnotation(Class)
default boolean isAlternativeAsynchronousAnnoationPresent()
default int maxRetries(org.eclipse.microprofile.faulttolerance.Retry annotation)
default long delay(org.eclipse.microprofile.faulttolerance.Retry annotation)
default ChronoUnit delayUnit(org.eclipse.microprofile.faulttolerance.Retry annotation)
default long maxDuration(org.eclipse.microprofile.faulttolerance.Retry annotation)
default ChronoUnit durationUnit(org.eclipse.microprofile.faulttolerance.Retry annotation)
default long jitter(org.eclipse.microprofile.faulttolerance.Retry annotation)
default ChronoUnit jitterDelayUnit(org.eclipse.microprofile.faulttolerance.Retry annotation)
default Class<? extends Throwable>[] retryOn(org.eclipse.microprofile.faulttolerance.Retry annotation)
default Class<? extends Throwable>[] abortOn(org.eclipse.microprofile.faulttolerance.Retry annotation)
default Class<? extends Throwable>[] failOn(org.eclipse.microprofile.faulttolerance.CircuitBreaker annotation)
default long delay(org.eclipse.microprofile.faulttolerance.CircuitBreaker annotation)
default ChronoUnit delayUnit(org.eclipse.microprofile.faulttolerance.CircuitBreaker annotation)
default int requestVolumeThreshold(org.eclipse.microprofile.faulttolerance.CircuitBreaker annotation)
default double failureRatio(org.eclipse.microprofile.faulttolerance.CircuitBreaker annotation)
default int successThreshold(org.eclipse.microprofile.faulttolerance.CircuitBreaker annotation)
default int value(org.eclipse.microprofile.faulttolerance.Bulkhead annotation)
default int waitingTaskQueue(org.eclipse.microprofile.faulttolerance.Bulkhead annotation)
default long value(org.eclipse.microprofile.faulttolerance.Timeout annotation)
default ChronoUnit unit(org.eclipse.microprofile.faulttolerance.Timeout annotation)
default Class<? extends org.eclipse.microprofile.faulttolerance.FallbackHandler<?>> value(org.eclipse.microprofile.faulttolerance.Fallback annotation)
default String fallbackMethod(org.eclipse.microprofile.faulttolerance.Fallback annotation)
Copyright © 2019. All rights reserved.