Annotation Type Bulkhead
@Retention(RUNTIME)
@Target({METHOD,TYPE})
@Documented
public @interface Bulkhead
This annotation can be applied to a class or a specific method. Applying it on a class is
equivalent to applying it on all its public methods. If using Spring,
name and fallbackMethod can be resolved using Spring Expression Language (SpEL).-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.StringnameName of the bulkhead. -
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.StringfallbackMethodfallbackMethod method name.Bulkhead.Typetype
-
Element Details
-
name
java.lang.String nameName of the bulkhead. It can be SpEL expression. If you want to use the first parameter of the method as name, you can express it as#root.args[0],#p0or#a0. The method name can be accessed via#root.methodName. To invoke a method on a Spring bean, pass@yourBean.yourMethod(#a0).- Returns:
- the name of the bulkhead
-
-
-
fallbackMethod
java.lang.String fallbackMethodfallbackMethod method name.- Returns:
- fallbackMethod method name.
- Default:
- ""
-
type
Bulkhead.Type type- Returns:
- the bulkhead implementation type (SEMAPHORE or THREADPOOL)
- Default:
- SEMAPHORE
-