|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.eql.db.ConnectionCache
net.esper.eql.db.ConnectionCacheImpl
public class ConnectionCacheImpl
Caches the Connection and PreparedStatement instance for reuse.
Constructor Summary | |
---|---|
ConnectionCacheImpl(DatabaseConnectionFactory databaseConnectionFactory,
String sql)
Ctor. |
Method Summary | |
---|---|
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. |
Methods inherited from class net.esper.eql.db.ConnectionCache |
---|
close, makeNew |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionCacheImpl(DatabaseConnectionFactory databaseConnectionFactory, String sql)
databaseConnectionFactory
- - connection factorysql
- - statement sqlMethod Detail |
---|
public 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |