public abstract class PooledConnectionProvider<W,R> extends java.lang.Object implements ConnectionProvider<W,R>, PooledConnection.Owner
PooledConnectionProvider that pools connections.
Following are the key parameters:
PoolLimitDeterminationStrategy: A strategy to determine whether a new physical connection should be
created as part of the user request.PoolConfig.getIdleConnectionsCleanupTimer(): The schedule for cleaning up idle connections in the pool.PoolConfig.getMaxIdleTimeMillis(): Maximum time a connection can be idle in this pool.ConnectionProviderFactoryConnectionProvider provided by a HostConnector.
SingleHostPoolingProviderFactory that will only ever pick
a single host but will pool connections.| Constructor and Description |
|---|
PooledConnectionProvider() |
| Modifier and Type | Method and Description |
|---|---|
static <W,R> PooledConnectionProvider<W,R> |
create(PoolConfig<W,R> config,
HostConnector<W,R> delegate) |
static <W,R> PooledConnectionProvider<W,R> |
createBounded(int maxConnections,
HostConnector<W,R> delegate) |
static <W,R> PooledConnectionProvider<W,R> |
createUnbounded(HostConnector<W,R> delegate) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewConnectionRequestdiscard, releasepublic static <W,R> PooledConnectionProvider<W,R> createUnbounded(HostConnector<W,R> delegate)
public static <W,R> PooledConnectionProvider<W,R> createBounded(int maxConnections, HostConnector<W,R> delegate)
public static <W,R> PooledConnectionProvider<W,R> create(PoolConfig<W,R> config, HostConnector<W,R> delegate)