Connection - the generic type of the connections that will be producedpublic interface ConnectionHandlingStrategyFactory<Connection>
ConnectionHandlingStrategy| Modifier and Type | Method and Description |
|---|---|
ConnectionHandlingStrategy<Connection> |
cached()
Returns a strategy which lazily creates and caches connections so that each invocation to the
ConnectionProvider.connect() method using the same config argument results in the same
connection. |
ConnectionHandlingStrategy<Connection> |
none()
Creates a strategy which adds no behaviour.
|
ConnectionHandlingStrategy<Connection> |
requiresPooling()
Creates a strategy in which pooling is enforced.
|
ConnectionHandlingStrategy<Connection> |
requiresPooling(PoolingListener<Connection> poolingListener)
Performs the exact same contract as
requiresPooling() but adding the possibility
to specify a PoolingListener which allows additional custom handling of the pooled Connections
when they're borrowed and returned to the pool |
ConnectionHandlingStrategy<Connection> |
supportsPooling()
Creates a strategy which supports pooling but does not enforce it.
|
ConnectionHandlingStrategy<Connection> |
supportsPooling(PoolingListener<Connection> poolingListener)
Performs the exact same contract as
supportsPooling() but adding the possibility
to specify a PoolingListener which allows additional custom handling of the pooled Connections
when they're borrowed and returned to the pool |
ConnectionHandlingStrategy<Connection> supportsPooling()
PoolingProfile which
PoolingProfile.isDisabled() method returns true.
If pooling is enabled, then invoking ConnectionHandler.release() will not close
the connection, it will just return it to the pool. If disabled, then the release method
will actually close the connection.ConnectionHandlingStrategyConnectionHandlingStrategy<Connection> supportsPooling(PoolingListener<Connection> poolingListener)
supportsPooling() but adding the possibility
to specify a PoolingListener which allows additional custom handling of the pooled Connections
when they're borrowed and returned to the poolpoolingListener - a not null PoolingListenerConnectionHandlingStrategyConnectionHandlingStrategy<Connection> requiresPooling()
PoolingProfiles which
PoolingProfile.isDisabled() method returns true are not accepted
and will generate an IllegalArgumentException.
Invoking ConnectionHandler.release() will not close the connection, it will just
return it to the pool.ConnectionHandlingStrategyIllegalArgumentException - if defaultPoolingProfile attempts to disable poolingConnectionHandlingStrategy<Connection> requiresPooling(PoolingListener<Connection> poolingListener)
requiresPooling() but adding the possibility
to specify a PoolingListener which allows additional custom handling of the pooled Connections
when they're borrowed and returned to the poolpoolingListener - a not null PoolingListenerConnectionHandlingStrategyConnectionHandlingStrategy<Connection> cached()
ConnectionProvider.connect() method using the same config argument results in the same
connection. Invoking ConnectionHandler.release() will not close the connection.ConnectionHandlingStrategyConnectionHandlingStrategy<Connection> none()
ConnectionHandlingStrategy.getConnectionHandler() is invoked and will be closed when
ConnectionHandler.release() is called.ConnectionHandlingStrategyCopyright © 2016 MuleSoft, Inc.. All rights reserved.