Package com.io7m.idstore.database.postgres.internal

# Class IdDatabaseMetrics

java.lang.Object
com.io7m.idstore.database.postgres.internal.IdDatabaseMetrics

All Implemented Interfaces:
  `IdDatabaseMetricsMXBean`

public final class IdDatabaseMetrics extends Object implements IdDatabaseMetricsMXBean
An MX bean for database metrics.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IdDatabaseMetrics()`
  An MX bean for database metrics.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addTransactionTimeCommitted(double seconds)`
  Add a (committed) transaction time.
  `void`
  `addTransactionTimeRolledBack(double seconds)`
  Add a (rolled-back) transaction time.
  `long`
  `getTransactionCommits()`
  `double`
  `getTransactionMaxSeconds()`
  `double`
  `getTransactionMeanSeconds()`
  `double`
  `getTransactionMinSeconds()`
  `long`
  `getTransactionRollbacks()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### IdDatabaseMetrics

    public IdDatabaseMetrics()
    An MX bean for database metrics.

- ## Method Details

  - ### getTransactionCommits

    public long getTransactionCommits()
    Specified by:
      `getTransactionCommits` in interface `IdDatabaseMetricsMXBean`
    Returns:
      The number of transactions committed since the application started

  - ### getTransactionRollbacks

    public long getTransactionRollbacks()
    Specified by:
      `getTransactionRollbacks` in interface `IdDatabaseMetricsMXBean`
    Returns:
      The number of transactions rolled back since the application started

  - ### getTransactionMeanSeconds

    public double getTransactionMeanSeconds()
    Specified by:
      `getTransactionMeanSeconds` in interface `IdDatabaseMetricsMXBean`
    Returns:
      The mean transaction time

  - ### getTransactionMaxSeconds

    public double getTransactionMaxSeconds()
    Specified by:
      `getTransactionMaxSeconds` in interface `IdDatabaseMetricsMXBean`
    Returns:
      The max transaction time

  - ### getTransactionMinSeconds

    public double getTransactionMinSeconds()
    Specified by:
      `getTransactionMinSeconds` in interface `IdDatabaseMetricsMXBean`
    Returns:
      The min transaction time

  - ### addTransactionTimeCommitted

    public void addTransactionTimeCommitted(double seconds)
    Add a (committed) transaction time.
    Parameters:
      `seconds` - The transaction time in seconds

  - ### addTransactionTimeRolledBack

    public void addTransactionTimeRolledBack(double seconds)
    Add a (rolled-back) transaction time.
    Parameters:
      `seconds` - The transaction time in seconds