All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.dynamodb.runtime.NettyHttpClientConfig Maven / Gradle / Ivy

There is a newer version: 3.0.0.Beta1
Show newest version
package io.quarkus.dynamodb.runtime;

import java.net.URI;
import java.time.Duration;
import java.util.List;
import java.util.Optional;

import io.netty.handler.ssl.SslProvider;
import io.quarkus.runtime.annotations.ConfigGroup;
import io.quarkus.runtime.annotations.ConfigItem;
import software.amazon.awssdk.http.Protocol;

@ConfigGroup
public class NettyHttpClientConfig {

    /**
     * The maximum number of allowed concurrent requests.
     * 

* For HTTP/1.1 this is the same as max connections. For HTTP/2 the number of connections that will be used depends on the * max streams allowed per connection. */ @ConfigItem(defaultValue = "50") public int maxConcurrency; /** * The maximum number of pending acquires allowed. *

* Once this exceeds, acquire tries will be failed. */ @ConfigItem(defaultValue = "10000") public int maxPendingConnectionAcquires; /** * The amount of time to wait for a read on a socket before an exception is thrown. *

* Specify `0` to disable. */ @ConfigItem(defaultValue = "30S") public Duration readTimeout; /** * The amount of time to wait for a write on a socket before an exception is thrown. *

* Specify `0` to disable. */ @ConfigItem(defaultValue = "30S") public Duration writeTimeout; /** * The amount of time to wait when initially establishing a connection before giving up and timing out. */ @ConfigItem(defaultValue = "10S") public Duration connectionTimeout; /** * The amount of time to wait when acquiring a connection from the pool before giving up and timing out. */ @ConfigItem(defaultValue = "2S") public Duration connectionAcquisitionTimeout; /** * The maximum amount of time that a connection should be allowed to remain open, regardless of usage frequency. */ @ConfigItem public Optional connectionTimeToLive; /** * The maximum amount of time that a connection should be allowed to remain open while idle. *

* Currently has no effect if `quarkus.dynamodb.async-client.use-idle-connection-reaper` is false. */ @ConfigItem(defaultValue = "60S") public Duration connectionMaxIdleTime; /** * Whether the idle connections in the connection pool should be closed. *

* When enabled, connections left idling for longer than `quarkus.dynamodb.async-client.connection-max-idle-time` will be * closed. This will not close connections currently in use. */ @ConfigItem(defaultValue = "true") public boolean useIdleConnectionReaper; /** * The HTTP protocol to use. */ @ConfigItem(defaultValue = "http1-1") public Protocol protocol; /** * The maximum number of concurrent streams for an HTTP/2 connection. *

* This setting is only respected when the HTTP/2 protocol is used. *

* 0 means unlimited. */ @ConfigItem(defaultValue = "0") public int maxHttp2Streams; /** * The SSL Provider to be used in the Netty client. *

* Default is `OPENSSL` if available, `JDK` otherwise. */ @ConfigItem public Optional sslProvider; /** * HTTP proxy configuration */ @ConfigItem public NettyProxyConfiguration proxy; /** * TLS Managers provider configuration */ @ConfigItem public TlsManagersProviderConfig tlsManagersProvider; /** * Netty event loop configuration override */ @ConfigItem public SdkEventLoopGroupConfig eventLoop; @ConfigGroup public static class SdkEventLoopGroupConfig { /** * Enable the custom configuration of the Netty event loop group. */ @ConfigItem public boolean override; /** * Number of threads to use for the event loop group. *

* If not set, the default Netty thread count is used (which is double the number of available processors unless the * `io.netty.eventLoopThreads` system property is set. */ @ConfigItem public Optional numberOfThreads; /** * The thread name prefix for threads created by this thread factory used by event loop group. *

* The prefix will be appended with a number unique to the thread factory and a number unique to the thread. *

* If not specified it defaults to `aws-java-sdk-NettyEventLoop` */ @ConfigItem public Optional threadNamePrefix; } @ConfigGroup public static class NettyProxyConfiguration { /** * Enable HTTP proxy. */ @ConfigItem public boolean enabled; /** * The endpoint of the proxy server that the SDK should connect through. *

* Currently, the endpoint is limited to a host and port. Any other URI components will result in an exception being * raised. */ @ConfigItem public URI endpoint; /** * The hosts that the client is allowed to access without going through the proxy. */ @ConfigItem public List nonProxyHosts; } //TODO: additionalChannelOptions //additionalChannelOptions; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy