com.avaje.ebean.cache
Class ServerCacheStatistics

java.lang.Object
  extended by com.avaje.ebean.cache.ServerCacheStatistics

public class ServerCacheStatistics
extends Object

The statistics collected per cache.

These can be monitored to review the effectiveness of a particular cache.

Author:
rbygrave

Constructor Summary
ServerCacheStatistics()
           
 
Method Summary
 String getCacheName()
          Return the name of the cache.
 int getHitCount()
          Return the hit count.
 int getHitRatio()
          Returns an int from 0 to 100 (percentage) for the hit ratio.
 int getMaxSize()
          Return the maximum size of the cache.
 int getMissCount()
          Return the miss count.
 int getSize()
          Return the size of the cache.
 void setCacheName(String cacheName)
          Set the name of the cache.
 void setHitCount(int hitCount)
          Set the hit count.
 void setMaxSize(int maxSize)
          Set the maximum size of the cache.
 void setMissCount(int missCount)
          Set the miss count.
 void setSize(int size)
          Set the size of the cache.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerCacheStatistics

public ServerCacheStatistics()
Method Detail

getCacheName

public String getCacheName()
Return the name of the cache.


setCacheName

public void setCacheName(String cacheName)
Set the name of the cache.


getHitCount

public int getHitCount()
Return the hit count. The number of successful gets.


setHitCount

public void setHitCount(int hitCount)
Set the hit count.


getMissCount

public int getMissCount()
Return the miss count. The number of gets that returned null.


setMissCount

public void setMissCount(int missCount)
Set the miss count.


getSize

public int getSize()
Return the size of the cache.


setSize

public void setSize(int size)
Set the size of the cache.


getMaxSize

public int getMaxSize()
Return the maximum size of the cache.

Can be used in conjunction with the size to determine if the cache use is being potentially limited by its maximum size.


setMaxSize

public void setMaxSize(int maxSize)
Set the maximum size of the cache.


getHitRatio

public int getHitRatio()
Returns an int from 0 to 100 (percentage) for the hit ratio.

A hit ratio of 100 means every get request against the cache hits an entry.



Copyright © 2010. All Rights Reserved.