public class MultiConnectionCachingFactory extends Object implements CachingConnectionFactory
ConnectionInfo.| Constructor and Description |
|---|
MultiConnectionCachingFactory(ConnectionFactory delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeConnections()
Closes all active connections in the cache.
|
Connection |
getConnection(ConnectionInfo info)
Creates a
connection and caches it. |
public MultiConnectionCachingFactory(ConnectionFactory delegate)
public Connection getConnection(ConnectionInfo info) throws SQLException
connection and caches it.
The returned connection does not support
Connection.close(). Consumer must call {#close} to close the cached connections.getConnection in interface ConnectionFactoryinfo - the connection parametersSQLExceptionpublic void closeConnections()
throws SQLException
closeConnections in interface CachingConnectionFactorySQLExceptionCopyright © 2021 The Apache Software Foundation. All rights reserved.