|
||||||||||
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.ConnectionNoCacheImpl
public class ConnectionNoCacheImpl
Implementation of a connection cache that simply doesn't cache but gets a new connection and statement every request, and closes these every time a client indicates done.
Constructor Summary | |
---|---|
ConnectionNoCacheImpl(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 ConnectionNoCacheImpl(DatabaseConnectionFactory databaseConnectionFactory, String sql)
databaseConnectionFactory
- is the connection factorysql
- is the 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 |