Interface Timeout

All Superinterfaces:
FtHandler, RuntimeType.Api<TimeoutConfig>

public interface Timeout extends FtHandler, RuntimeType.Api<TimeoutConfig>
Timeout attempts to terminate execution after defined duration of time.
  • Method Details

    • create

      static Timeout create(TimeoutConfig config)
      Create a timeout based on configuration.
      Parameters:
      config - timeout configuration
      Returns:
      timeout handler
    • create

      static Timeout create(Consumer<TimeoutConfig.Builder> builderConsumer)
      Create a timeout with a possibility to customize its configuration.
      Parameters:
      builderConsumer - consumer to customize configuration
      Returns:
      a new timeout
    • builder

      static TimeoutConfig.Builder builder()
      Create a new fluent API builder to customize a timeout.
      Returns:
      a new timeout builder
    • create

      static Timeout create(Duration timeout)
      Create a Timeout with specified timeout.
      Parameters:
      timeout - duration of the timeout of operations handled by the new Timeout instance
      Returns:
      a new timeout