TransactionStats (Oracle - Berkeley DB Java API)
Date: 2017-04-13

com.sleepycat.db

## Class TransactionStats

- java.lang.Object
- - com.sleepycat.db.TransactionStats

-     public class TransactionStats
      extends java.lang.Object

  Transaction statistics for a database environment.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `TransactionStats.Active`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getInittxns()` The initial number of transactions configured.
    `LogSequenceNumber` | `getLastCkp()` The LSN of the last checkpoint.
    `int` | `getLastTxnId()` The last transaction ID allocated.
    `int` | `getMaxNactive()` The maximum number of active transactions at any one time.
    `int` | `getMaxNsnapshot()` The maximum number of transactions on the snapshot list at any one time.
    `int` | `getMaxTxns()` The maximum number of active transactions configured.
    `long` | `getNaborts()` The number of transactions that have aborted.
    `int` | `getNactive()` The number of transactions that are currently active.
    `long` | `getNumBegins()` The number of transactions that have begun.
    `long` | `getNumCommits()` The number of transactions that have committed.
    `int` | `getNumRestores()` The number of transactions that have been restored.
    `int` | `getNumSnapshot()` The number of transactions on the snapshot list.
    `long` | `getRegionNowait()` The number of times that a thread of control was able to obtain the transaction region mutex without waiting.
    `long` | `getRegionWait()` The number of times that a thread of control was forced to wait before obtaining the transaction region mutex.
    `long` | `getRegSize()` The size of the region.
    `long` | `getTimeCkp()` The time the last completed checkpoint finished (as the number of seconds since the Epoch, returned by the IEEE/ANSI Std 1003.1 (POSIX) time interface).
    `TransactionStats.Active[]` | `getTxnarray()` An array of `Active` objects, describing the currently active transactions.
    `java.lang.String` | `toString()`

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

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

- - ### Method Detail

    - #### getNumRestores

          public int getNumRestores()

      The number of transactions that have been restored.
      Returns:
        the number of transactions that have been restored

    - #### getLastCkp

          public LogSequenceNumber getLastCkp()

      The LSN of the last checkpoint.
      Returns:
        the LSN of the last checkpoint

    - #### getTimeCkp

          public long getTimeCkp()

      The time the last completed checkpoint finished (as the number of seconds since the Epoch, returned by the IEEE/ANSI Std 1003.1 (POSIX) time interface).
      Returns:
        the time the last completed checkpoint finished

    - #### getLastTxnId

          public int getLastTxnId()

      The last transaction ID allocated.
      Returns:
        the last transaction ID allocated

    - #### getInittxns

          public int getInittxns()

      The initial number of transactions configured.
      Returns:
        the initial number of transactions configured

    - #### getMaxTxns

          public int getMaxTxns()

      The maximum number of active transactions configured.
      Returns:
        the maximum number of active transactions configured

    - #### getNaborts

          public long getNaborts()

      The number of transactions that have aborted.
      Returns:
        the number of transactions that have aborted

    - #### getNumBegins

          public long getNumBegins()

      The number of transactions that have begun.
      Returns:
        the number of transactions that have begun

    - #### getNumCommits

          public long getNumCommits()

      The number of transactions that have committed.
      Returns:
        the number of transactions that have committed

    - #### getNactive

          public int getNactive()

      The number of transactions that are currently active.
      Returns:
        the number of transactions that are currently active

    - #### getNumSnapshot

          public int getNumSnapshot()

      The number of transactions on the snapshot list. These are transactions which modified a database opened with `DatabaseConfig.setMultiversion(boolean)`, and which have committed or aborted, but the copies of pages they created are still in the cache.
      Returns:
        the number of transactions on the snapshot list

    - #### getMaxNactive

          public int getMaxNactive()

      The maximum number of active transactions at any one time.
      Returns:
        the maximum number of active transactions at any one time

    - #### getMaxNsnapshot

          public int getMaxNsnapshot()

      The maximum number of transactions on the snapshot list at any one time.
      Returns:
        the maximum number of transactions on the snapshot list at any one time

    - #### getRegionWait

          public long getRegionWait()

      The number of times that a thread of control was forced to wait before obtaining the transaction region mutex.
      Returns:
        the number of times that a thread of control was forced to wait before obtaining the transaction region mutex

    - #### getRegionNowait

          public long getRegionNowait()

      The number of times that a thread of control was able to obtain the transaction region mutex without waiting.
      Returns:
        the number of times that a thread of control was able to obtain the transaction region mutex without waiting

    - #### getRegSize

          public long getRegSize()

      The size of the region.
      Returns:
        the size of the region

    - #### getTxnarray

          public TransactionStats.Active[] getTxnarray()

      An array of `Active` objects, describing the currently active transactions.
      Returns:
        an array of Active transactions

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright (c) 1996, 2017 Oracle and/or its affiliates. All rights reserved.