Annotation Interface SentinelResource
The annotation indicates a definition of Sentinel resource.
- 从以下版本开始:
- 0.1.1
- 作者:
- Eric Zhao, zhaoyuguang
-
可选元素概要
可选元素修饰符和类型可选元素说明Class<?>[]TheblockHandleris located in the same class with the original method by default.ThedefaultFallbackis used as the default universal fallback method.Indicates the exceptions to be ignored.Class<?>[]Thefallbackis located in the same class with the original method by default.int
-
元素详细资料
-
value
String value- 返回:
- name of the Sentinel resource
- 默认值:
- ""
-
entryType
EntryType entryType- 返回:
- the entry type (inbound or outbound), outbound by default
- 默认值:
- OUT
-
resourceType
int resourceType- 返回:
- the classification (type) of the resource
- 从以下版本开始:
- 1.7.0
- 默认值:
- 0
-
blockHandler
String blockHandler- 返回:
- name of the block exception function, empty by default
- 默认值:
- ""
-
blockHandlerClass
Class<?>[] blockHandlerClassTheblockHandleris 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.- 返回:
- the class where the block handler exists, should not provide more than one classes
- 默认值:
- {}
-
fallback
String fallback- 返回:
- name of the fallback function, empty by default
- 默认值:
- ""
-
defaultFallback
String defaultFallbackThedefaultFallbackis used as the default universal fallback method. It should not accept any parameters, and the return type should be compatible with the original method.- 返回:
- name of the default fallback method, empty by default
- 从以下版本开始:
- 1.6.0
- 默认值:
- ""
-
fallbackClass
Class<?>[] fallbackClassThefallbackis 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.- 返回:
- the class where the fallback method is located (only single class)
- 从以下版本开始:
- 1.6.0
- 默认值:
- {}
-
exceptionsToTrace
- 返回:
- the list of exception classes to trace,
Throwableby default - 从以下版本开始:
- 1.5.1
- 默认值:
- {java.lang.Throwable.class}
-
exceptionsToIgnore
Indicates the exceptions to be ignored. Note thatexceptionsToTraceshould not appear withexceptionsToIgnoreat the same time, orexceptionsToIgnorewill be of higher precedence.- 返回:
- the list of exception classes to ignore, empty by default
- 从以下版本开始:
- 1.6.0
- 默认值:
- {}
-