Class DefaultStatisticManager

java.lang.Object
org.seasar.doma.jdbc.statistic.DefaultStatisticManager
All Implemented Interfaces:
StatisticManager

public class DefaultStatisticManager extends Object implements StatisticManager
The default implementation of StatisticManager.
  • Constructor Details

    • DefaultStatisticManager

      public DefaultStatisticManager()
    • DefaultStatisticManager

      public DefaultStatisticManager(boolean enabled)
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Description copied from interface: StatisticManager
      Returns whether this manager is enabled.
      Specified by:
      isEnabled in interface StatisticManager
      Returns:
      whether this manager is enabled
    • setEnabled

      public void setEnabled(boolean enabled)
      Description copied from interface: StatisticManager
      Sets whether this manager is enabled.
      Specified by:
      setEnabled in interface StatisticManager
      Parameters:
      enabled - whether this manager is enabled
    • getStatistics

      public Iterable<Statistic> getStatistics()
      Description copied from interface: StatisticManager
      Returns the statistics.
      Specified by:
      getStatistics in interface StatisticManager
      Returns:
      the statistics
    • recordSqlExecution

      public void recordSqlExecution(Sql<?> sql, long startTimeNanos, long endTimeNanos)
      Description copied from interface: StatisticManager
      Records the execution of SQL.
      Specified by:
      recordSqlExecution in interface StatisticManager
      Parameters:
      sql - the SQL
      startTimeNanos - the start time in nanoseconds
      endTimeNanos - the end time in nanoseconds
    • clear

      public void clear()
      Description copied from interface: StatisticManager
      Clears the statistics.
      Specified by:
      clear in interface StatisticManager
    • toString

      public String toString()
      Overrides:
      toString in class Object