Top Description Methods
org.eclipse.microprofile.faulttolerance

public @Interface Timeout

extends Annotation
Annotations
@Inherited
@Documented
@Retention:RUNTIME
@Target:METHOD, TYPE
@InterceptorBinding
Imports
java.lang.annotation.Documented, .ElementType, .Inherited, .Retention, .RetentionPolicy, .Target, java.time.temporal.ChronoUnit, jakarta.enterprise.util.Nonbinding, jakarta.interceptor.InterceptorBinding

The annotation to define a method execution timeout.
Author
Emily Jiang
See Also
value(), unit()

Method Summary

Modifier and TypeMethod and Description
public ChronoUnit

Returns:

the timeout unit
unit
()

The timeout unit.

public long

Returns:

the timeout value
value
()

The timeout value.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

unitback to summary
public ChronoUnit unit()

The timeout unit. Defaults to java.time.temporal.ChronoUnit#MILLIS.

Returns:ChronoUnit

the timeout unit

Annotations
@Nonbinding
valueback to summary
public long value()

The timeout value. The value must be greater than or equal to 0. 0 means no timeout configured. Otherwise, org.eclipse.microprofile.faulttolerance.exceptions.FaultToleranceDefinitionException occurs.

Returns:long

the timeout value

Annotations
@Nonbinding