public class ConnectionNoCacheImpl extends ConnectionCache
Constructor and Description |
---|
ConnectionNoCacheImpl(DatabaseConnectionFactory databaseConnectionFactory,
String sql)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroys cache closing all resources cached, if any.
|
void |
doneWith(Pair<Connection,PreparedStatement> pair)
Indicate to return the connection and statement pair after use.
|
Pair<Connection,PreparedStatement> |
getConnection()
Returns a cached or new connection and statement pair.
|
close, makeNew
public ConnectionNoCacheImpl(DatabaseConnectionFactory databaseConnectionFactory, String sql)
databaseConnectionFactory
- is the connection factorysql
- is the statement sqlpublic Pair<Connection,PreparedStatement> getConnection()
ConnectionCache
getConnection
in class ConnectionCache
public void doneWith(Pair<Connection,PreparedStatement> pair)
ConnectionCache
doneWith
in class ConnectionCache
pair
- is the resources to returnpublic void destroy()
ConnectionCache
destroy
in class ConnectionCache