## net.dontdrinkandroot.cache.statistics.impl
Class SimpleCacheStatistics

    java.lang.Object
      net.dontdrinkandroot.cache.statistics.impl.SimpleCacheStatistics

All Implemented Interfaces:
  Serializable, CacheStatistics

    public class SimpleCacheStatistics

extends Object
implements CacheStatistics

Author:
  Philip W. Sorst <philip@sorst.net>
See Also:
  Serialized Form

Constructor Summary
`SimpleCacheStatistics()`

Method Summary
`long` `getCacheHits()` Get the total number of cache hits.
`long` `getCacheMisses()` Get the total number of cache misses.
`long` `getCacheMissesExpired()` Get the number of cache misses where the entry was expired.
`long` `getCacheMissesNotFound()` Get the number of cache misses where the entry was not found.
`int` `getCurrentSize()` Get the current size (the number of entries) in the cache.
`long` `getGetCount()` Get the total get count.
`float` `getHitRate()` Get the current hit rate, this is a value [0,1] which is the percentage of hits on all get requests.
`long` `getPutCount()` Get the total put count.
`void` `increaseCacheHits()`
`void` `increaseCacheMissesExpired()`
`void` `increaseCacheMissesNotFound()`
`void` `increaseGetCount()`
`void` `increasePutCount()`
`void` `reset()` Reset the statistics.
`void` `setCacheHits(long cacheHits)`
`void` `setCacheMissesExpired(long cacheMissesExpired)`
`void` `setCacheMissesNotFound(long cacheMissesNotFound)`
`void` `setCurrentSize(int currentSize)`
`void` `setGetCount(long getCount)`
`void` `setPutCount(long putCount)`
`String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SimpleCacheStatistics

    public SimpleCacheStatistics()

Method Detail

### getCacheHits

    public long getCacheHits()

  Description copied from interface: `CacheStatistics`
  Get the total number of cache hits.

  Specified by:
    `getCacheHits` in interface `CacheStatistics`

### setCacheHits

    public void setCacheHits(long cacheHits)

### getCacheMissesNotFound

    public long getCacheMissesNotFound()

  Description copied from interface: `CacheStatistics`
  Get the number of cache misses where the entry was not found.

  Specified by:
    `getCacheMissesNotFound` in interface `CacheStatistics`

### setCacheMissesNotFound

    public void setCacheMissesNotFound(long cacheMissesNotFound)

### getCacheMissesExpired

    public long getCacheMissesExpired()

  Description copied from interface: `CacheStatistics`
  Get the number of cache misses where the entry was expired.

  Specified by:
    `getCacheMissesExpired` in interface `CacheStatistics`

### setCacheMissesExpired

    public void setCacheMissesExpired(long cacheMissesExpired)

### getPutCount

    public long getPutCount()

  Description copied from interface: `CacheStatistics`
  Get the total put count.

  Specified by:
    `getPutCount` in interface `CacheStatistics`

### setPutCount

    public void setPutCount(long putCount)

### getGetCount

    public long getGetCount()

  Description copied from interface: `CacheStatistics`
  Get the total get count.

  Specified by:
    `getGetCount` in interface `CacheStatistics`

### setGetCount

    public void setGetCount(long getCount)

### reset

    public void reset()

  Description copied from interface: `CacheStatistics`
  Reset the statistics.

  Specified by:
    `reset` in interface `CacheStatistics`

### getHitRate

    public float getHitRate()

  Description copied from interface: `CacheStatistics`
  Get the current hit rate, this is a value [0,1] which is the percentage of hits on all get requests.

  Specified by:
    `getHitRate` in interface `CacheStatistics`

### getCacheMisses

    public long getCacheMisses()

  Description copied from interface: `CacheStatistics`
  Get the total number of cache misses.

  Specified by:
    `getCacheMisses` in interface `CacheStatistics`

### getCurrentSize

    public int getCurrentSize()

  Description copied from interface: `CacheStatistics`
  Get the current size (the number of entries) in the cache.

  Specified by:
    `getCurrentSize` in interface `CacheStatistics`

### setCurrentSize

    public void setCurrentSize(int currentSize)

### increasePutCount

    public void increasePutCount()

### increaseGetCount

    public void increaseGetCount()

### increaseCacheMissesNotFound

    public void increaseCacheMissesNotFound()

### increaseCacheMissesExpired

    public void increaseCacheMissesExpired()

### increaseCacheHits

    public void increaseCacheHits()

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Copyright © 2013 dontdrinkandroot. All Rights Reserved.