Annotation Interface SentinelResource


@Target({METHOD,TYPE}) @Retention(RUNTIME) @Inherited public @interface SentinelResource
The annotation indicates a definition of Sentinel resource.
从以下版本开始:
0.1.1
作者:
Eric Zhao, zhaoyuguang
  • 元素详细资料

    • 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<?>[] blockHandlerClass
      The 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.
      返回:
      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 defaultFallback
      The 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.
      返回:
      name of the default fallback method, empty by default
      从以下版本开始:
      1.6.0
      默认值:
      ""
    • fallbackClass

      Class<?>[] fallbackClass
      The 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.
      返回:
      the class where the fallback method is located (only single class)
      从以下版本开始:
      1.6.0
      默认值:
      {}
    • exceptionsToTrace

      Class<? extends Throwable>[] exceptionsToTrace
      返回:
      the list of exception classes to trace, Throwable by default
      从以下版本开始:
      1.5.1
      默认值:
      {java.lang.Throwable.class}
    • exceptionsToIgnore

      Class<? extends Throwable>[] exceptionsToIgnore
      Indicates the exceptions to be ignored. Note that exceptionsToTrace should not appear with exceptionsToIgnore at the same time, or exceptionsToIgnore will be of higher precedence.
      返回:
      the list of exception classes to ignore, empty by default
      从以下版本开始:
      1.6.0
      默认值:
      {}