Class HttpClientConfiguration

java.lang.Object
org.apache.beam.sdk.io.aws2.common.HttpClientConfiguration
All Implemented Interfaces:
Serializable

public abstract class HttpClientConfiguration extends Object implements Serializable
HTTP client configuration for both, sync and async AWS clients.

All timeouts are configured in milliseconds.

See Also:
  • Constructor Details

    • HttpClientConfiguration

      public HttpClientConfiguration()
  • Method Details

    • connectionAcquisitionTimeout

      @Nullable @Pure public abstract Integer connectionAcquisitionTimeout()
      Milliseconds to wait when acquiring a connection from the pool before giving up and timing out.
    • connectionMaxIdleTime

      @Nullable @Pure public abstract Integer connectionMaxIdleTime()
      Maximum milliseconds a connection should be allowed to remain open while idle.

      This will never close a connection that is currently in use, so long-lived connections may remain open longer than this time.

    • connectionTimeout

      @Nullable @Pure public abstract Integer connectionTimeout()
      Milliseconds to wait when initially establishing a connection before giving up and timing out. A duration of 0 means infinity, and is not recommended.
    • connectionTimeToLive

      @Nullable @Pure public abstract Integer connectionTimeToLive()
      Maximum milliseconds a connection should be allowed to remain open, regardless of usage frequency.

      This will never close a connection that is currently in use, so long-lived connections may remain open longer than this time.

    • socketTimeout

      @Nullable @Pure public abstract Integer socketTimeout()
      Milliseconds to wait for data to be transferred over an established, open connection before the connection is timed out. A duration of 0 means infinity, and is not recommended.
    • readTimeout

      @Nullable @Pure public abstract Integer readTimeout()
      Milliseconds to wait for a read on a socket before an exception is thrown. A duration of 0 means infinity, and is not recommended.

      Note: Read timeout is only supported for async clients and ignored otherwise. Use socketTimeout() instead.

    • writeTimeout

      @Nullable @Pure public abstract Integer writeTimeout()
      Milliseconds to wait for a write on a socket before an exception is thrown. A duration of 0 means infinity, and is not recommended.

      Note: Write timeout is only supported for async clients and ignored otherwise. Use socketTimeout() instead.

    • maxConnections

      @Nullable @Pure public abstract Integer maxConnections()
      The maximum number of connections allowed in the connection pool. Each client has its own private connection pool.

      For asynchronous clients using HTTP/1.1 this corresponds to the maximum number of allowed concurrent requests. When using HTTP/2 the number of connections that will be used depends on the max streams allowed per connection.

    • builder

      public static HttpClientConfiguration.Builder builder()