org.objectledge.database
Class MonitoringPreparedStatement
java.lang.Object
org.objectledge.database.impl.DelegatingStatement
org.objectledge.database.impl.DelegatingPreparedStatement
org.objectledge.database.MonitoringPreparedStatement
- All Implemented Interfaces:
- PreparedStatement, Statement
public class MonitoringPreparedStatement
- extends DelegatingPreparedStatement
PreparedStatement wrapper that monitors the number of DB reads/writes, and their duration.
- Version:
- $Id: MonitoringPreparedStatement.java,v 1.1 2005/10/10 09:44:50 rafal Exp $
- Author:
- RafaĆ Krzewski
| Methods inherited from class org.objectledge.database.impl.DelegatingPreparedStatement |
addBatch, clearParameters, clearParameters2, getBody, getMetaData, getParameterList, getParameterMetaData, getSQL, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL |
| Methods inherited from class org.objectledge.database.impl.DelegatingStatement |
addBatch, addToBatchBuffer, cancel, clearBatch, clearWarnings, close, execute, execute, execute, execute, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getBatchBuffer, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.sql.Statement |
addBatch, cancel, clearBatch, clearWarnings, close, execute, execute, execute, execute, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout |
threadConn
private final ThreadDataSource.ThreadConnection threadConn
MonitoringPreparedStatement
public MonitoringPreparedStatement(PreparedStatement preparedStatement,
String sql,
ThreadDataSource.ThreadConnection threadConn)
- Creates a new MonitoringPreparedStatement instance.
- Parameters:
preparedStatement - delegate prepared statement.sql - statement body.threadConn - the associated ThreadConnection.
execute
public boolean execute()
throws SQLException
-
- Specified by:
execute in interface PreparedStatement- Overrides:
execute in class DelegatingPreparedStatement
- Throws:
SQLException
executeQuery
public ResultSet executeQuery()
throws SQLException
-
- Specified by:
executeQuery in interface PreparedStatement- Overrides:
executeQuery in class DelegatingPreparedStatement
- Throws:
SQLException
executeUpdate
public int executeUpdate()
throws SQLException
-
- Specified by:
executeUpdate in interface PreparedStatement- Overrides:
executeUpdate in class DelegatingPreparedStatement
- Throws:
SQLException
executeBatch
public int[] executeBatch()
throws SQLException
-
- Specified by:
executeBatch in interface Statement- Overrides:
executeBatch in class DelegatingStatement
- Throws:
SQLException
Copyright © 2003-2006 objectledge.org. All Rights Reserved.