@Target(value=METHOD)
@Retention(value=RUNTIME)
@Inherited
@Documented
public @interface HystrixCommand
| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.String |
commandKey
Hystrix command key.
|
HystrixProperty[] |
commandProperties
Specifies command properties.
|
java.lang.String |
defaultFallback
Specifies default fallback method for the command.
|
java.lang.String |
fallbackMethod
Specifies a method to process fallback logic.
|
java.lang.String |
groupKey
The command group key is used for grouping together commands such as for reporting,
alerting, dashboards or team/library ownership.
|
java.lang.Class<? extends java.lang.Throwable>[] |
ignoreExceptions
Defines exceptions which should be ignored.
|
ObservableExecutionMode |
observableExecutionMode
Specifies the mode that should be used to execute hystrix observable command.
|
HystrixException[] |
raiseHystrixExceptions
When includes RUNTIME_EXCEPTION, any exceptions that are not ignored are wrapped in HystrixRuntimeException.
|
java.lang.String |
threadPoolKey
The thread-pool key is used to represent a
HystrixThreadPool for monitoring, metrics publishing, caching and other such uses.
|
HystrixProperty[] |
threadPoolProperties
Specifies thread pool properties.
|
public abstract java.lang.String groupKey
public abstract java.lang.String commandKey
...public abstract java.lang.String threadPoolKey
public abstract java.lang.String fallbackMethod
public abstract HystrixProperty[] commandProperties
public abstract HystrixProperty[] threadPoolProperties
public abstract java.lang.Class<? extends java.lang.Throwable>[] ignoreExceptions
public abstract ObservableExecutionMode observableExecutionMode
ObservableExecutionMode.public abstract HystrixException[] raiseHystrixExceptions
public abstract java.lang.String defaultFallback
fallbackMethod() and defaultFallback()
methods are specified then specific one is used.
note: default fallback method cannot have parameters, return type should be compatible with command return type.