BtreeStats (Oracle - Berkeley DB Java Edition API)
Date: 2014-12-16

com.sleepycat.je

## Class BtreeStats

- java.lang.Object
- - com.sleepycat.je.DatabaseStats
  - - com.sleepycat.je.BtreeStats

- All Implemented Interfaces:
    Serializable

      public class BtreeStats
      extends DatabaseStats

  The BtreeStats object is used to return Btree database statistics.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BtreeStats()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `long[]` | `getBINEntriesHistogram()` Returns an array representing a histogram of the number of Bottom Internal Nodes with various percentages of non-deleted entry counts.
    `long[]` | `getBINsByLevel()` Returns the count of Bottom Internal Nodes per level, indexed by level.
    `long` | `getBottomInternalNodeCount()` Returns the number of Bottom Internal Nodes in the database tree.
    `long[]` | `getDBINsByLevel()` Deprecated. as of 5.0, returns an empty array.
    `long` | `getDeletedLeafNodeCount()` Returns the number of deleted data records in the database tree that are pending removal by the compressor.
    `long[]` | `getDINsByLevel()` Deprecated. as of 5.0, returns an empty array.
    `long` | `getDupCountLeafNodeCount()` Deprecated. as of 5.0, returns zero.
    `long` | `getDuplicateBottomInternalNodeCount()` Deprecated. as of 5.0, returns zero.
    `long` | `getDuplicateInternalNodeCount()` Deprecated. as of 5.0, returns zero.
    `int` | `getDuplicateTreeMaxDepth()` Deprecated. as of 5.0, returns zero.
    `long[]` | `getINsByLevel()` Returns the count of Internal Nodes per level, indexed by level.
    `long` | `getInternalNodeCount()` Returns the number of Internal Nodes in the database tree.
    `long` | `getLeafNodeCount()` Returns the number of leaf nodes in the database tree, which can equal the number of records.
    `int` | `getMainTreeMaxDepth()` Returns the maximum depth of the main database tree.
    `long` | `getRelatches()` Returns the number of latch upgrades (relatches) required while operating on this database's BTree.
    `int` | `getRootSplits()` The number of times the root of the BTree was split.
    `String` | `toString()` For convenience, the BtreeStats class has a toString method that lists all the data fields.
    `String` | `toStringVerbose()`

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

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

- - ### Constructor Detail

    - #### BtreeStats

          public BtreeStats()

  - ### Method Detail

    - #### getBottomInternalNodeCount

          public long getBottomInternalNodeCount()

      Returns the number of Bottom Internal Nodes in the database tree.

      The information is included only if the `Database.getStats` call was not configured by the `StatsConfig.setFast` method.

      Returns:
        number of Bottom Internal Nodes in the database tree.

    - #### getDuplicateBottomInternalNodeCount

          public long getDuplicateBottomInternalNodeCount()

      Deprecated. as of 5.0, returns zero.

    - #### getDeletedLeafNodeCount

          public long getDeletedLeafNodeCount()

      Returns the number of deleted data records in the database tree that are pending removal by the compressor.

      The information is included only if the `Database.getStats` call was not configured by the `StatsConfig.setFast` method.

      Returns:
        number of deleted data records in the database tree that are pending removal by the compressor.

    - #### getDupCountLeafNodeCount

          public long getDupCountLeafNodeCount()

      Deprecated. as of 5.0, returns zero.

    - #### getInternalNodeCount

          public long getInternalNodeCount()

      Returns the number of Internal Nodes in the database tree.

      The information is included only if the `Database.getStats` call was not configured by the `StatsConfig.setFast` method.

      Returns:
        number of Internal Nodes in the database tree.

    - #### getDuplicateInternalNodeCount

          public long getDuplicateInternalNodeCount()

      Deprecated. as of 5.0, returns zero.

    - #### getLeafNodeCount

          public long getLeafNodeCount()

      Returns the number of leaf nodes in the database tree, which can equal the number of records. This is calculated without locks or transactions, and therefore is only an accurate count of the current number of records when the database is quiescent.

      The information is included only if the `Database.getStats` call was not configured by the `StatsConfig.setFast` method.

      Returns:
        number of leaf nodes in the database tree, which can equal the number of records. This is calculated without locks or transactions, and therefore is only an accurate count of the current number of records when the database is quiescent.

    - #### getMainTreeMaxDepth

          public int getMainTreeMaxDepth()

      Returns the maximum depth of the main database tree.

      The information is included only if the `Database.getStats` call was not configured by the `StatsConfig.setFast` method.

      Returns:
        maximum depth of the main database tree.

    - #### getDuplicateTreeMaxDepth

          public int getDuplicateTreeMaxDepth()

      Deprecated. as of 5.0, returns zero.

    - #### getINsByLevel

          public long[] getINsByLevel()

      Returns the count of Internal Nodes per level, indexed by level.

      The information is included only if the `Database.getStats` call was not configured by the `StatsConfig.setFast` method.

      Returns:
        count of Internal Nodes per level, indexed by level.

    - #### getBINsByLevel

          public long[] getBINsByLevel()

      Returns the count of Bottom Internal Nodes per level, indexed by level.

      The information is included only if the `Database.getStats` call was not configured by the `StatsConfig.setFast` method.

      Returns:
        count of Bottom Internal Nodes per level, indexed by level.

    - #### getBINEntriesHistogram

          public long[] getBINEntriesHistogram()

      Returns an array representing a histogram of the number of Bottom Internal Nodes with various percentages of non-deleted entry counts. The array is 10 elements and each element represents a range of 10%.

           element [0]: # BINs with 0% to 9% entries used by non-deleted values
           element [1]: # BINs with 10% to 19% entries used by non-deleted values
           element [2]: # BINs with 20% to 29% entries used by non-deleted values
           ...
           element [0]: # BINs with 90% to 100% entries used by non-deleted values

      Returns:
        an array representing a histogram of the number of BINs with various percentages of non-deleted entries.

    - #### getDINsByLevel

          public long[] getDINsByLevel()

      Deprecated. as of 5.0, returns an empty array.

    - #### getDBINsByLevel

          public long[] getDBINsByLevel()

      Deprecated. as of 5.0, returns an empty array.

    - #### getRelatches

          public long getRelatches()

      Returns the number of latch upgrades (relatches) required while operating on this database's BTree. Latch upgrades are required when an operation assumes that a shared (read) latch will be sufficient but later determines that an exclusive (write) latch will actually be required.
      Returns:
        number of latch upgrades (relatches) required.

    - #### getRootSplits

          public int getRootSplits()

      The number of times the root of the BTree was split.
      Returns:
        number of times the root was split.

    - #### toString

          public String toString()

      For convenience, the BtreeStats class has a toString method that lists all the data fields.
      Overrides:
        `toString` in class `Object`

    - #### toStringVerbose

          public String toStringVerbose()

Copyright (c) 2004, 2014 Oracle and/or its affiliates. All rights reserved.