|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.epl.db.ConnectionCache
com.espertech.esper.epl.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,
java.lang.String sql)
Ctor. |
Method Summary | |
---|---|
void |
destroy()
Destroys cache closing all resources cached, if any. |
void |
doneWith(Pair<java.sql.Connection,java.sql.PreparedStatement> pair)
Indicate to return the connection and statement pair after use. |
Pair<java.sql.Connection,java.sql.PreparedStatement> |
getConnection()
Returns a cached or new connection and statement pair. |
Methods inherited from class com.espertech.esper.epl.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, java.lang.String sql)
databaseConnectionFactory
- is the connection factorysql
- is the statement sqlMethod Detail |
---|
public Pair<java.sql.Connection,java.sql.PreparedStatement> getConnection()
ConnectionCache
getConnection
in class ConnectionCache
public void doneWith(Pair<java.sql.Connection,java.sql.PreparedStatement> pair)
ConnectionCache
doneWith
in class ConnectionCache
pair
- is the resources to returnpublic void destroy()
ConnectionCache
destroy
in class ConnectionCache
|
© 2006-2015 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |