ConnectionProvider will produce Connection
| Modifier and Type | Class and Description |
|---|---|
| public static interface | |
| public static class | ConnectionProvider.Builder
Build a |
| public static class | ConnectionProvider.ConnectionPoolSpec<SPEC extends ConnectionProvider.
Configuration for a connection pool. |
| public static class | ConnectionProvider.HostSpecificSpec
Configuration for a connection pool per remote host. |
| public static interface | ConnectionProvider.MeterRegistrar
A strategy to register which metrics are collected in a particular connection pool. |
| Modifier and Type | Field and Description |
|---|---|
| public static final long | DEFAULT_POOL_ACQUIRE_TIMEOUT
Default acquisition timeout (milliseconds) before error. |
| public static final String | DEFAULT_POOL_LEASING_STRATEGY
Default leasing strategy (fifo, lifo), fallback to fifo. |
| public static final int | DEFAULT_POOL_MAX_CONNECTIONS
Default max connections. |
| public static final long | DEFAULT_POOL_MAX_IDLE_TIME
Default max idle time, fallback - max idle time is not specified. |
| public static final long | DEFAULT_POOL_MAX_LIFE_TIME
Default max life time, fallback - max life time is not specified. |
| public static final String | LEASING_STRATEGY_FIFO
The connection selection is first in, first out. |
| public static final String | LEASING_STRATEGY_LIFO
The connection selection is last in, first out. |
| Modifier and Type | Method and Description |
|---|---|
| public Mono | acquire(TransportConfig
the transport configuration config, ConnectionObserver connectionObserver, Supplier<? extends SocketAddress> the remoteAddress, AddressResolverGroup<?> SocketAddress to connect tothe resolver which will resolve the address of the unresolved named address resolverGroup)Return an existing or new |
| public static ConnectionProvider. | Returns: a new ConnectionProvider builderConnectionProvider nameCreates a builder for |
| public static ConnectionProvider | create(String
the connection pool name name)Create a new |
| public static ConnectionProvider | create(String
the connection pool name name, int the maximum number of connections before starting pending
acquisition on existing ones maxConnections)Create a new |
| public static ConnectionProvider | create(String
the connection pool name name, int the maximum number of connections before starting pending
acquisition on existing ones maxConnections, boolean true enables metrics collection; false disables it metricsEnabled)Create a new |
| public default void | |
| public default Mono | Returns: a Mono representing the completion of the ConnectionProvider disposal.Returns a Mono that triggers the disposal of the ConnectionProvider when subscribed to. |
| public default void | disposeWhen(SocketAddress
the remote address remoteAddress)Dispose all connection pools for the specified remote address. |
| public default int | Returns: the maximum number of connections before starting pendingReturns the maximum number of connections before starting pending |
| public default Map | Returns: the maximum number of connections per host before starting pendingReturns the maximum number of connections per host before starting pending |
| public default ConnectionProvider. | Returns: a builder to mutate properties of thisConnectionProviderReturns a builder to mutate properties of this |
| public default String | Returns: ConnectionProvider name used for metricsReturns |
| public static ConnectionProvider |