@Target(value={METHOD,TYPE}) @Retention(value=RUNTIME) @Inherited public @interface SentinelResource
| Modifier and Type | Optional Element and Description |
|---|---|
String |
blockHandler |
Class<?>[] |
blockHandlerClass
The
blockHandler is located in the same class with the original method by default. |
String |
defaultFallback
The
defaultFallback is used as the default universal fallback method. |
EntryType |
entryType |
Class<? extends Throwable>[] |
exceptionsToIgnore
Indicates the exceptions to be ignored.
|
Class<? extends Throwable>[] |
exceptionsToTrace |
String |
fallback |
Class<?>[] |
fallbackClass
The
fallback is located in the same class with the original method by default. |
int |
resourceType |
String |
value |
public abstract String value
public abstract EntryType entryType
public abstract int resourceType
public abstract String blockHandler
public abstract Class<?>[] blockHandlerClass
blockHandler is located in the same class with the original method by default.
However, if some methods share the same signature and intend to set the same block handler,
then users can set the class where the block handler exists. Note that the block handler method
must be static.public abstract String fallback
public abstract String defaultFallback
defaultFallback is used as the default universal fallback method.
It should not accept any parameters, and the return type should be compatible
with the original method.public abstract Class<?>[] fallbackClass
fallback is located in the same class with the original method by default.
However, if some methods share the same signature and intend to set the same fallback,
then users can set the class where the fallback function exists. Note that the shared fallback method
must be static.public abstract Class<? extends Throwable>[] exceptionsToIgnore
exceptionsToTrace should
not appear with exceptionsToIgnore at the same time, or exceptionsToIgnore
will be of higher precedence.Copyright © 2021 Alibaba Group. All rights reserved.