Interface AmpAsyncWaiter.Builder

Enclosing interface:
AmpAsyncWaiter

public static interface AmpAsyncWaiter.Builder
  • Method Details

    • scheduledExecutorService

      AmpAsyncWaiter.Builder scheduledExecutorService(ScheduledExecutorService executorService)
      Sets a custom ScheduledExecutorService that will be used to schedule async polling attempts

      This executorService must be closed by the caller when it is ready to be disposed. The SDK will not close the executorService when the waiter is closed

      Parameters:
      executorService - the executorService to set
      Returns:
      a reference to this object so that method calls can be chained together.
    • overrideConfiguration

      AmpAsyncWaiter.Builder overrideConfiguration(WaiterOverrideConfiguration overrideConfiguration)
      Defines overrides to the default SDK waiter configuration that should be used for waiters created from this builder
      Parameters:
      overrideConfiguration - the override configuration to set
      Returns:
      a reference to this object so that method calls can be chained together.
    • overrideConfiguration

      default AmpAsyncWaiter.Builder overrideConfiguration(Consumer<WaiterOverrideConfiguration.Builder> overrideConfiguration)
      This is a convenient method to pass the override configuration without the need to create an instance manually via WaiterOverrideConfiguration.builder()
      Parameters:
      overrideConfiguration - The consumer that will configure the overrideConfiguration
      Returns:
      a reference to this object so that method calls can be chained together.
      See Also:
    • client

      Sets a custom AmpAsyncClient that will be used to poll the resource

      This SDK client must be closed by the caller when it is ready to be disposed. The SDK will not close the client when the waiter is closed

      Parameters:
      client - the client to send the request
      Returns:
      a reference to this object so that method calls can be chained together.
    • build

      Builds an instance of AmpAsyncWaiter based on the configurations supplied to this builder
      Returns:
      An initialized AmpAsyncWaiter