com.ibatis.db.sqlmap
Class StatementFactory
java.lang.Object
com.ibatis.db.sqlmap.StatementFactory
- public class StatementFactory
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CACHE_LOCK
private java.lang.Object CACHE_LOCK
allAvailableStatements
private java.util.List allAvailableStatements
maxTotalCachedStatements
private int maxTotalCachedStatements
availableStatementMap
private java.util.Map availableStatementMap
busyStatementMap
private java.util.Map busyStatementMap
cacheRequests
private int cacheRequests
cacheHits
private int cacheHits
StatementFactory
public StatementFactory()
getMaxTotalCachedStatements
public int getMaxTotalCachedStatements()
setMaxTotalCachedStatements
public void setMaxTotalCachedStatements(int maxTotalCachedStatements)
getCacheHitRatio
public java.lang.Double getCacheHitRatio()
newStatement
public java.sql.PreparedStatement newStatement(java.sql.Connection conn,
java.lang.String sql,
boolean cache)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
newCallable
public java.sql.CallableStatement newCallable(java.sql.Connection conn,
java.lang.String sql,
boolean cache)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getStatement
public java.sql.PreparedStatement getStatement(java.sql.Connection conn,
java.lang.String sql)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
releaseStatement
public void releaseStatement(java.sql.PreparedStatement ps)
forceCloseStatement
private static void forceCloseStatement(java.sql.Statement statement)