Annotation Type Async


@Retention(RUNTIME) @Target(TYPE) public @interface Async
An annotation for marking asynchronous health check execution.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Enum representing the initial health states.
    static enum 
    Enum representing the possible schedule types.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    long
    Period between executions.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    long
    How long a healthy result is considered valid before being ignored.
    long
    Initial delay of first execution.
    Initial health state until first asynchronous execution completes.
    Scheduling type of asynchronous executions.
    Time unit of initial delay, period and healthyTtl.
  • Element Details

    • period

      long period
      Period between executions.
      Returns:
      period
    • scheduleType

      Async.ScheduleType scheduleType
      Scheduling type of asynchronous executions.
      Returns:
      schedule type
      Default:
      FIXED_RATE
    • initialDelay

      long initialDelay
      Initial delay of first execution.
      Returns:
      initial delay
      Default:
      0L
    • unit

      TimeUnit unit
      Time unit of initial delay, period and healthyTtl.
      Returns:
      time unit
      Default:
      SECONDS
    • initialState

      Async.InitialState initialState
      Initial health state until first asynchronous execution completes.
      Returns:
      initial health state
      Default:
      HEALTHY
    • healthyTtl

      long healthyTtl
      How long a healthy result is considered valid before being ignored. Handles cases where the asynchronous healthcheck did not run (for example thread starvation). Defaults to 2 * period
      Returns:
      healthy result time to live
      Default:
      -1L