Annotation Interface Timeout


@Target({METHOD,TYPE,ANNOTATION_TYPE}) @Retention(RUNTIME) public @interface Timeout
Class or method level annotation that indicates the calling thread should not wait longer than the provided timeout for the results of a command.
Since:
2.0
Author:
Allard Buijze
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    Indicates the amount of time the dispatching thread may wait for a result.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Indicates the unit in which the timeout is declared.
  • Element Details

    • value

      int value
      Indicates the amount of time the dispatching thread may wait for a result.
    • unit

      TimeUnit unit
      Indicates the unit in which the timeout is declared. Defaults to milliseconds.
      Default:
      MILLISECONDS