Class ConfigAnnotationAsset
java.lang.Object
org.eclipse.microprofile.fault.tolerance.tck.config.ConfigAnnotationAsset
- All Implemented Interfaces:
org.jboss.shrinkwrap.api.asset.Asset
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautoscaleClass
(Class<?> clazz) Generate config which scales the timeout values of all annotations on the classautoscaleMethod
(Class<?> clazz, String method) Generate config which scales the timeout values of all annotations on a single methodmergeProperties
(Properties properties) set
(Class<?> clazz, String method, Class<? extends Annotation> annotation, String parameter, String value) Configure a parameter on an annotation applied to a methodsetGlobally
(Class<? extends Annotation> annotation, String parameter, String value) Configure the parameter of an annotation globallyConfigure thevalue
parameter on an annotation applied to a method
-
Constructor Details
-
ConfigAnnotationAsset
public ConfigAnnotationAsset()
-
-
Method Details
-
openStream
- Specified by:
openStream
in interfaceorg.jboss.shrinkwrap.api.asset.Asset
-
autoscaleMethod
Generate config which scales the timeout values of all annotations on a single methodThe following values are scaled using the scale factor in TCKConfig:
- Retry.maxDuration
- Retry.delay
- Retry.jitter
- Timeout.value
- CircuitBreaker.delay
- Returns:
this
-
autoscaleClass
Generate config which scales the timeout values of all annotations on the classOnly annotations directly on the class are affected, config is not generated for any annotations on methods. Use
autoscaleMethod(Class, String)
to generate config for methods.The following values are scaled using the scale factor in TCKConfig:
- Retry.maxDuration
- Retry.delay
- Retry.jitter
- Timeout.value
- CircuitBreaker.delay
- Returns:
this
-
setValue
public ConfigAnnotationAsset setValue(Class<?> clazz, String method, Class<? extends Annotation> annotation, String value) Configure thevalue
parameter on an annotation applied to a method- Parameters:
clazz
- the class which has the methodmethod
- the method which has the annotationannotation
- the annotation type which has the parametervalue
- the value to configure- Returns:
this
-
set
public ConfigAnnotationAsset set(Class<?> clazz, String method, Class<? extends Annotation> annotation, String parameter, String value) Configure a parameter on an annotation applied to a method- Parameters:
clazz
- the class which has the methodmethod
- the name of the method which has the annotationannotation
- the annotation type which has the parameterparameter
- the parameter namevalue
- the value to configure- Returns:
this
-
setGlobally
public ConfigAnnotationAsset setGlobally(Class<? extends Annotation> annotation, String parameter, String value) Configure the parameter of an annotation globally- Parameters:
annotation
- the annotation type which has the parameterparameter
- the parameter namevalue
- the value to configure- Returns:
this
-
mergeProperties
-