com.sleepycat.db

## Class HashStats

- java.lang.Object
- - com.sleepycat.db.DatabaseStats
  - - com.sleepycat.db.HashStats

-     public class HashStats
      extends DatabaseStats

  The HashStats object is used to return Hash database statistics.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getBFree()` The number of bytes free on bucket pages.
    `long` | `getBigBFree()` The number of bytes free on hash overflow (big item) pages.
    `int` | `getBigPages()` The number of hash overflow pages (created when key/data is too big for the page).
    `int` | `getBuckets()` The number of hash buckets.
    `int` | `getDup()` The number of duplicate pages.
    `long` | `getDupFree()` The number of bytes free on duplicate pages.
    `int` | `getExtFiles()` The number of external files.
    `int` | `getFfactor()` The desired fill factor specified at database-creation time.
    `int` | `getFree()` The number of pages on the free list.
    `int` | `getMagic()` The magic number that identifies the file as a Hash file.
    `int` | `getMetaFlags()` Reports internal flags.
    `int` | `getNumBlobs()` Deprecated. Replaced with `getExtFiles()`.
    `int` | `getNumData()` The number of key/data pairs in the database.
    `int` | `getNumKeys()` The number of unique keys in the database.
    `int` | `getOverflows()` The number of bucket overflow pages (bucket overflow pages are created when items did not fit on the main bucket page).
    `long` | `getOvflFree()` The number of bytes free on bucket overflow pages.
    `int` | `getPageCount()` The number of pages in the database.
    `int` | `getPageSize()` The underlying Hash database page (and bucket) size, in bytes.
    `int` | `getVersion()` The version of the Hash database.
    `java.lang.String` | `toString()` For convenience, the HashStats class has a toString method that lists all the data fields.

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

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

- - ### Method Detail

    - #### getMagic

          public int getMagic()

      The magic number that identifies the file as a Hash file.
      Returns:
        the magic number that identifies the files as a Hash file

    - #### getVersion

          public int getVersion()

      The version of the Hash database.
      Returns:
        the version of the Hash database

    - #### getMetaFlags

          public int getMetaFlags()

      Reports internal flags. For internal use only.
      Returns:
        internal flags

    - #### getNumKeys

          public int getNumKeys()

      The number of unique keys in the database.

      If the `Database.getStats` call was configured by the `StatsConfig.setFast` method, the count will be the last saved value unless it has never been calculated, in which case it will be 0.

      Returns:
        the number of unique keys in the database

    - #### getNumData

          public int getNumData()

      The number of key/data pairs in the database.

      If the `Database.getStats` call was configured by the `StatsConfig.setFast` method, the count will be the last saved value unless it has never been calculated, in which case it will be 0.

      Returns:
        the number of key/data pairs in the database

    - #### getExtFiles

          public int getExtFiles()

      The number of external files.
      Returns:
        the number of external files

    - #### getNumBlobs

          public int getNumBlobs()

      Deprecated. Replaced with `getExtFiles()`.
      Returns:
        the number of external files

    - #### getPageCount

          public int getPageCount()

      The number of pages in the database.

      Returned if `StatsConfig.setFast(boolean)` was configured.

      Returns:
        the number of pages in the database

    - #### getPageSize

          public int getPageSize()

      The underlying Hash database page (and bucket) size, in bytes.
      Returns:
        the underlying Hash database page (and bucket) size, in bytes

    - #### getFfactor

          public int getFfactor()

      The desired fill factor specified at database-creation time.
      Returns:
        the desired fill factor specified at database-creation time

    - #### getBuckets

          public int getBuckets()

      The number of hash buckets.
      Returns:
        the number of hash buckets

    - #### getFree

          public int getFree()

      The number of pages on the free list.

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

      Returns:
        the number of pages on the free list

    - #### getBFree

          public long getBFree()

      The number of bytes free on bucket pages.

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

      Returns:
        the number of bytes free on bucket pages

    - #### getBigPages

          public int getBigPages()

      The number of hash overflow pages (created when key/data is too big for the page).

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

      Returns:
        the number of hash overflow pages

    - #### getBigBFree

          public long getBigBFree()

      The number of bytes free on hash overflow (big item) pages.

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

      Returns:
        the number of bytes free on hash overflow pages

    - #### getOverflows

          public int getOverflows()

      The number of bucket overflow pages (bucket overflow pages are created when items did not fit on the main bucket page).

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

      Returns:
        the number of bucket overflow pages

    - #### getOvflFree

          public long getOvflFree()

      The number of bytes free on bucket overflow pages.

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

      Returns:
        the number of bytes free on bucket overflow pages

    - #### getDup

          public int getDup()

      The number of duplicate pages.

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

      Returns:
        the number of duplicate pages

    - #### getDupFree

          public long getDupFree()

      The number of bytes free on duplicate pages.

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

      Returns:
        the number of bytes free on duplicate pages

    - #### toString

          public java.lang.String toString()

      For convenience, the HashStats class has a toString method that lists all the data fields.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        a String that lists all the data fields

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