java.lang.Object
org.seasar.doma.jdbc.statistic.DefaultStatisticManager
- All Implemented Interfaces:
StatisticManager
The default implementation of
StatisticManager.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the statistics.Returns the statistics.booleanReturns whether this manager is enabled.voidrecordSqlExecution(Sql<?> sql, long startTimeNanos, long endTimeNanos) Records the execution of SQL.voidsetEnabled(boolean enabled) Sets whether this manager is enabled.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.seasar.doma.jdbc.statistic.StatisticManager
executeSql
-
Constructor Details
-
DefaultStatisticManager
public DefaultStatisticManager() -
DefaultStatisticManager
public DefaultStatisticManager(boolean enabled)
-
-
Method Details
-
isEnabled
public boolean isEnabled()Description copied from interface:StatisticManagerReturns whether this manager is enabled.- Specified by:
isEnabledin interfaceStatisticManager- Returns:
- whether this manager is enabled
-
setEnabled
public void setEnabled(boolean enabled) Description copied from interface:StatisticManagerSets whether this manager is enabled.- Specified by:
setEnabledin interfaceStatisticManager- Parameters:
enabled- whether this manager is enabled
-
getStatistics
Description copied from interface:StatisticManagerReturns the statistics.- Specified by:
getStatisticsin interfaceStatisticManager- Returns:
- the statistics
-
recordSqlExecution
Description copied from interface:StatisticManagerRecords the execution of SQL.- Specified by:
recordSqlExecutionin interfaceStatisticManager- Parameters:
sql- the SQLstartTimeNanos- the start time in nanosecondsendTimeNanos- the end time in nanoseconds
-
clear
public void clear()Description copied from interface:StatisticManagerClears the statistics.- Specified by:
clearin interfaceStatisticManager
-
toString
-