Annotation Interface RPCTimeout


@Documented @Retention(RUNTIME) @Target({TYPE,METHOD}) public @interface RPCTimeout
Defines the timeout to apply to an RPC execution, either for an entire class or a specific RPC method. If the annotation is not explicitly provided, a default timeout is applied to all RPCs in a class. Note: if a method is inherited, the class-level rpc timeout is inherited from the root class that was introspected.
Since:
4.0
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    @Range(from=0L,to=9223372036854775807L) long
    Get the timeout to apply to the RPCs executed in a class or to the specific RPC executed by a method.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Get the time unit in which the RPC timeout provided by timeout() is measured.
  • Element Details

    • timeout

      @Range(from=0L,to=9223372036854775807L) long timeout
      Get the timeout to apply to the RPCs executed in a class or to the specific RPC executed by a method. The unit of the timeout can be configured using unit() which defaults to seconds. If an RPC method is annotated with this annotation it has more relevance than the annotation placed at the top-level class.

      The provided timeout must be positive. If the timeout is 0 then no timeout is applied to the method, and it can execute without any constraints time wise.

      Returns:
      the timeout to apply to the RPCs in a class or to the specific RPC executed by a method.
    • unit

      Get the time unit in which the RPC timeout provided by timeout() is measured. Defaults to seconds.
      Returns:
      the unit in which the given timeout is given.
      Default:
      SECONDS