net.sf.infrared.agent.jdbcstats
Class SqlStatisticsMap

java.lang.Object
  extended bynet.sf.infrared.agent.jdbcstats.SqlStatisticsMap
All Implemented Interfaces:
Serializable

public class SqlStatisticsMap
extends Object
implements Serializable

Stores the SqlStatistics of a sql against its id

See Also:
Serialized Form

Constructor Summary
SqlStatisticsMap()
           
 
Method Summary
 void aggregate(SqlStatistics[] sqlStatistics)
           
 void aggregate(SqlStatisticsMap other, IdMapper idMapper)
           
 SqlStatisticsMap copy()
           
 SqlStatistics[] getCopyOfSqlStatistics()
           
 int getNoOfQueries()
           
 void recordExecuteError(Long id, long time, boolean prepared)
          Record a failed execute
 void recordExecuteSql(Long id, long time, boolean prepared)
          Record a call to execute a statement
 void recordFetchComplete(Long id, long noOfRowsFetched, long timeTakenForFetch)
           
 void recordPrepareSql(Long id, long time)
          Record a call to prepare a sql statement
 void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlStatisticsMap

public SqlStatisticsMap()
Method Detail

recordPrepareSql

public void recordPrepareSql(Long id,
                             long time)
Record a call to prepare a sql statement

Parameters:
id - - id of the sql query
time - - time spent in preparing

recordExecuteSql

public void recordExecuteSql(Long id,
                             long time,
                             boolean prepared)
Record a call to execute a statement

Parameters:
id - - id of the sql query
time - - time spent in executing the query
prepared - - was it a prepared statement or plain statement

recordExecuteError

public void recordExecuteError(Long id,
                               long time,
                               boolean prepared)
Record a failed execute

Parameters:
id - - id of the sql query
time - - time spent in executing the query
prepared - - was it a prepared statement or plain statement

recordFetchComplete

public void recordFetchComplete(Long id,
                                long noOfRowsFetched,
                                long timeTakenForFetch)

getCopyOfSqlStatistics

public SqlStatistics[] getCopyOfSqlStatistics()

reset

public void reset()

aggregate

public void aggregate(SqlStatisticsMap other,
                      IdMapper idMapper)

aggregate

public void aggregate(SqlStatistics[] sqlStatistics)

getNoOfQueries

public int getNoOfQueries()

copy

public SqlStatisticsMap copy()