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

Methods
`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` `getOddfSizeDetect()` Odd file size detected.
`int` `getOddfSizeResolve()` Odd file size resolved.
`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 region lock without waiting.
`long` `getRegionWait()` The number of times that a thread of control was forced to wait before obtaining a region lock.
`long` `getRegmax()` The max size of the mutex region size.
`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).

#### getBytes

    public int getBytes()

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

#### getNumCache

    public int getNumCache()

Number of caches.

#### getMaxNumCache

    public int getMaxNumCache()

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

#### getMmapSize

    public long getMmapSize()

Maximum file size for mmap.

#### getMaxOpenfd

    public int getMaxOpenfd()

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.

#### getMaxWriteSleep

    public int getMaxWriteSleep()

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

#### getPages

    public int getPages()

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).

#### getCacheHit

    public long getCacheHit()

Requested pages found in the cache.

#### getCacheMiss

    public long getCacheMiss()

Requested pages not found in the cache.

#### getPageCreate

    public long getPageCreate()

Pages created in the cache.

#### getPageIn

    public long getPageIn()

Pages read into the cache.

#### getPageOut

    public long getPageOut()

Pages written from the cache to the backing file.

#### getRoEvict

    public long getRoEvict()

Clean pages forced from the cache.

#### getRwEvict

    public long getRwEvict()

Dirty pages forced from the cache.

#### getPageTrickle

    public long getPageTrickle()

Dirty pages written using `Environment.trickleCacheWrite`.

#### getPageClean

    public int getPageClean()

Clean pages currently in the cache.

#### getPageDirty

    public int getPageDirty()

Dirty pages currently in the cache.

#### getHashBuckets

    public int getHashBuckets()

Number of hash buckets in the buffer hash table.

#### getHashMutexes

    public int getHashMutexes()

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

#### getPageSize

    public int getPageSize()

Page size in bytes.

#### getHashSearches

    public int getHashSearches()

Total number of buffer hash table lookups.

#### getHashLongest

    public int getHashLongest()

The longest chain ever encountered in buffer hash table lookups.

#### getHashExamined

    public long getHashExamined()

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.

#### getHashWait

    public long getHashWait()

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.

#### getHashMaxWait

    public long getHashMaxWait()

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 region lock without waiting.

#### getRegionWait

    public long getRegionWait()

The number of times that a thread of control was forced to wait before obtaining a region lock.

#### getMultiversionFrozen

    public long getMultiversionFrozen()

Number of buffers frozen.

#### getMultiversionThawed

    public long getMultiversionThawed()

Number of buffers thawed.

#### getMultiversionFreed

    public long getMultiversionFreed()

Number of frozen buffers freed.

#### getMultiversionReused

    public long getMultiversionReused()

Number of outdated intermediate versions reused.

#### getAlloc

    public long getAlloc()

Number of page allocations.

#### getAllocBuckets

    public long getAllocBuckets()

Number of hash buckets checked during allocation.

#### getAllocMaxBuckets

    public long getAllocMaxBuckets()

Maximum number of hash buckets checked during an allocation.

#### getAllocPages

    public long getAllocPages()

Number of pages checked during allocation.

#### getAllocMaxPages

    public long getAllocMaxPages()

Maximum number of pages checked during an allocation.

#### getIoWait

    public long getIoWait()

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

#### getSyncInterrupted

    public long getSyncInterrupted()

Number of mpool sync operations interrupted.

#### getOddfSizeDetect

    public int getOddfSizeDetect()

Odd file size detected.

#### getOddfSizeResolve

    public int getOddfSizeResolve()

Odd file size resolved.

#### getRegSize

    public long getRegSize()

Individual cache size.

#### getRegmax

    public long getRegmax()

The max size of the mutex region size.

#### 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`