Package com.sleepycat.db

## Class CacheStats

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

-     public class CacheStats
      extends java.lang.Object

  Cache statistics for a database environment.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `long` | `getAlloc()` | Number of page allocations.
    `long` | `getAllocBuckets()` | Number of hash buckets checked during allocation.
    `long` | `getAllocMaxBuckets()` | Maximum number of hash buckets checked during an allocation.
    `long` | `getAllocMaxPages()` | Maximum number of pages checked during an allocation.
    `long` | `getAllocPages()` | Number of pages checked during allocation.
    `int` | `getBytes()` | Bytes of cache (total cache size is st_gbytes + st_bytes).
    `long` | `getCacheHit()` | Requested pages found in the cache.
    `long` | `getCacheMiss()` | Requested pages not found in the cache.
    `int` | `getGbytes()` | Gigabytes of cache (total cache size is st_gbytes + st_bytes).
    `int` | `getHashBuckets()` | Number of hash buckets in the buffer hash table.
    `long` | `getHashExamined()` | Total number of hash elements traversed during hash table lookups.
    `int` | `getHashLongest()` | The longest chain ever encountered in buffer hash table lookups.
    `long` | `getHashMaxNowait()` | The number of times a thread of control was able to obtain the hash bucket lock without waiting on the bucket which had the maximum number of times that a thread of control needed to wait.
    `long` | `getHashMaxWait()` | The maximum number of times any hash bucket lock was waited for by a thread of control.
    `int` | `getHashMutexes()` | The number of hash bucket mutexes in the buffer hash table.
    `long` | `getHashNowait()` | The number of times that a thread of control was able to obtain a hash bucket lock without waiting.
    `int` | `getHashSearches()` | Total number of buffer hash table lookups.
    `long` | `getHashWait()` | The number of times that a thread of control was forced to wait before obtaining a hash bucket lock.
    `long` | `getIoWait()` | Number of operations blocked waiting for I/O to complete.
    `int` | `getMap()` | Requested pages mapped into the process' address space (there is no available information about whether or not this request caused disk I/O, although examining the application page fault rate may be helpful).
    `int` | `getMaxNumCache()` | Maximum number of caches, as configured with `EnvironmentConfig.setCacheMax(long)`.
    `int` | `getMaxOpenfd()` | Maximum number of open file descriptors.
    `int` | `getMaxWrite()` | The maximum number of sequential write operations scheduled by the library when flushing dirty pages from the cache.
    `int` | `getMaxWriteSleep()` | The number of microseconds the thread of control should pause before scheduling further write operations.
    `long` | `getMmapSize()` | Maximum file size for mmap.
    `long` | `getMultiversionFreed()` | Number of frozen buffers freed.
    `long` | `getMultiversionFrozen()` | Number of buffers frozen.
    `long` | `getMultiversionReused()` | Number of outdated intermediate versions reused.
    `long` | `getMultiversionThawed()` | Number of buffers thawed.
    `int` | `getNumCache()` | Number of caches.
    `int` | `getPageClean()` | Clean pages currently in the cache.
    `long` | `getPageCreate()` | Pages created in the cache.
    `int` | `getPageDirty()` | Dirty pages currently in the cache.
    `long` | `getPageIn()` | Pages read into the cache.
    `long` | `getPageOut()` | Pages written from the cache to the backing file.
    `int` | `getPages()` | Pages in the cache.
    `int` | `getPageSize()` | Page size in bytes.
    `long` | `getPageTrickle()` | Dirty pages written using `Environment.trickleCacheWrite`.
    `long` | `getRegionNowait()` | The number of times that a thread of control was able to obtain a cache region mutex without waiting.
    `long` | `getRegionWait()` | The number of times that a thread of control was forced to wait before obtaining a cache region mutex.
    `long` | `getRegmax()` | The maximum size, in bytes, of the mutex region.
    `long` | `getRegSize()` | Individual cache size.
    `long` | `getRoEvict()` | Clean pages forced from the cache.
    `long` | `getRwEvict()` | Dirty pages forced from the cache.
    `long` | `getSyncInterrupted()` | Number of mpool sync operations interrupted.
    `java.lang.String` | `toString()` | For convenience, the CacheStats 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

    - #### getGbytes

          public int getGbytes()

      Gigabytes of cache (total cache size is st_gbytes + st_bytes).
      Returns:
        gigabytes of cache

    - #### getBytes

          public int getBytes()

      Bytes of cache (total cache size is st_gbytes + st_bytes).
      Returns:
        bytes of cache

    - #### getNumCache

          public int getNumCache()

      Number of caches.
      Returns:
        number of caches

    - #### getMaxNumCache

          public int getMaxNumCache()

      Maximum number of caches, as configured with `EnvironmentConfig.setCacheMax(long)`.
      Returns:
        maximum number of caches

    - #### getMmapSize

          public long getMmapSize()

      Maximum file size for mmap.
      Returns:
        maximum file size for mmap.

    - #### getMaxOpenfd

          public int getMaxOpenfd()

      Maximum number of open file descriptors.
      Returns:
        maximum number of open file descriptors

    - #### getMaxWrite

          public int getMaxWrite()

      The maximum number of sequential write operations scheduled by the library when flushing dirty pages from the cache.
      Returns:
        the maximum number of sequential write operations scheduled by the library when flushing dirty pages from the cache

    - #### getMaxWriteSleep

          public int getMaxWriteSleep()

      The number of microseconds the thread of control should pause before scheduling further write operations.
      Returns:
        the number of microseconds the thread of control should pause before scheduling further write operations

    - #### getPages

          public int getPages()

      Pages in the cache.
      Returns:
        pages in the cache

    - #### getMap

          public int getMap()

      Requested pages mapped into the process' address space (there is no available information about whether or not this request caused disk I/O, although examining the application page fault rate may be helpful).
      Returns:
        requested pages mapped into the process' address space

    - #### getCacheHit

          public long getCacheHit()

      Requested pages found in the cache.
      Returns:
        requested pages found in the cache

    - #### getCacheMiss

          public long getCacheMiss()

      Requested pages not found in the cache.
      Returns:
        requested pages not found in the cache

    - #### getPageCreate

          public long getPageCreate()

      Pages created in the cache.
      Returns:
        pages created in the cache

    - #### getPageIn

          public long getPageIn()

      Pages read into the cache.
      Returns:
        pages read into the cache

    - #### getPageOut

          public long getPageOut()

      Pages written from the cache to the backing file.
      Returns:
        pages written from the cache to the backing file

    - #### getRoEvict

          public long getRoEvict()

      Clean pages forced from the cache.
      Returns:
        clean pages forced from the cache

    - #### getRwEvict

          public long getRwEvict()

      Dirty pages forced from the cache.
      Returns:
        dirty pages forced from the cache

    - #### getPageTrickle

          public long getPageTrickle()

      Dirty pages written using `Environment.trickleCacheWrite`.
      Returns:
        dirty pages written using `Environment.trickleCacheWrite`

    - #### getPageClean

          public int getPageClean()

      Clean pages currently in the cache.
      Returns:
        clean pages currently in the cache

    - #### getPageDirty

          public int getPageDirty()

      Dirty pages currently in the cache.
      Returns:
        dirty pages currently in the cache

    - #### getHashBuckets

          public int getHashBuckets()

      Number of hash buckets in the buffer hash table.
      Returns:
        number of hash buckets in the buffer hash table

    - #### getHashMutexes

          public int getHashMutexes()

      The number of hash bucket mutexes in the buffer hash table.
      Returns:
        the number of hash bucket mutexes in the buffer hash table

    - #### getPageSize

          public int getPageSize()

      Page size in bytes.
      Returns:
        page size in bytes

    - #### getHashSearches

          public int getHashSearches()

      Total number of buffer hash table lookups.
      Returns:
        total number of buffer hash table lookups

    - #### getHashLongest

          public int getHashLongest()

      The longest chain ever encountered in buffer hash table lookups.
      Returns:
        the longest chain ever encountered in buffer hash table lookups

    - #### getHashExamined

          public long getHashExamined()

      Total number of hash elements traversed during hash table lookups.
      Returns:
        total number of hash elements traversed during hash table lookups

    - #### getHashNowait

          public long getHashNowait()

      The number of times that a thread of control was able to obtain a hash bucket lock without waiting.
      Returns:
        the number of times that a thread of control was able to obtain a hash bucket lock without waiting

    - #### getHashWait

          public long getHashWait()

      The number of times that a thread of control was forced to wait before obtaining a hash bucket lock.
      Returns:
        the number of times that a thread of control was forced to wait before obtaining a hash bucket lock

    - #### getHashMaxNowait

          public long getHashMaxNowait()

      The number of times a thread of control was able to obtain the hash bucket lock without waiting on the bucket which had the maximum number of times that a thread of control needed to wait.
      Returns:
        the number of times a thread of control was able to obtain the hash bucket lock without waiting on the bucket which had the maximum number of times that a thread of control was able to obtain

    - #### getHashMaxWait

          public long getHashMaxWait()

      The maximum number of times any hash bucket lock was waited for by a thread of control.
      Returns:
        the maximum number of times any hash bucket lock was waited for by a thread of control

    - #### getRegionNowait

          public long getRegionNowait()

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

    - #### getRegionWait

          public long getRegionWait()

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

    - #### getMultiversionFrozen

          public long getMultiversionFrozen()

      Number of buffers frozen.
      Returns:
        number of buffers frozen

    - #### getMultiversionThawed

          public long getMultiversionThawed()

      Number of buffers thawed.
      Returns:
        number of buffers thawed

    - #### getMultiversionFreed

          public long getMultiversionFreed()

      Number of frozen buffers freed.
      Returns:
        number of frozen buffers freed

    - #### getMultiversionReused

          public long getMultiversionReused()

      Number of outdated intermediate versions reused.
      Returns:
        number of outdated intermediate versions reused

    - #### getAlloc

          public long getAlloc()

      Number of page allocations.
      Returns:
        number of page allocations

    - #### getAllocBuckets

          public long getAllocBuckets()

      Number of hash buckets checked during allocation.
      Returns:
        number of hash buckets checked during allocation

    - #### getAllocMaxBuckets

          public long getAllocMaxBuckets()

      Maximum number of hash buckets checked during an allocation.
      Returns:
        maximum number of hash buckets checked during an allocation

    - #### getAllocPages

          public long getAllocPages()

      Number of pages checked during allocation.
      Returns:
        number of pages checked during allocation

    - #### getAllocMaxPages

          public long getAllocMaxPages()

      Maximum number of pages checked during an allocation.
      Returns:
        maximum number of pages checked during an allocation

    - #### getIoWait

          public long getIoWait()

      Number of operations blocked waiting for I/O to complete.
      Returns:
        number of operations blocked waiting for I/O to complete

    - #### getSyncInterrupted

          public long getSyncInterrupted()

      Number of mpool sync operations interrupted.
      Returns:
        number of mpool sync operations interrupted

    - #### getRegSize

          public long getRegSize()

      Individual cache size.
      Returns:
        individual cache size

    - #### getRegmax

          public long getRegmax()

      The maximum size, in bytes, of the mutex region.
      Returns:
        the maximum size, in bytes, of the mutex region

    - #### toString

          public java.lang.String toString()

      For convenience, the CacheStats 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, 2020 Oracle and/or its affiliates. All rights reserved.