public class ServerCacheStatistics extends Object
These can be monitored to review the effectiveness of a particular cache.
| Modifier and Type | Field and Description |
|---|---|
protected String |
cacheName |
protected int |
hitCount |
protected int |
maxSize |
protected int |
missCount |
protected int |
size |
| Constructor and Description |
|---|
ServerCacheStatistics() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
String |
toString() |
protected String cacheName
protected int maxSize
protected int size
protected int hitCount
protected int missCount
public String getCacheName()
public void setCacheName(String cacheName)
public int getHitCount()
public void setHitCount(int hitCount)
public int getMissCount()
public void setMissCount(int missCount)
public int getSize()
public void setSize(int size)
public int getMaxSize()
Can be used in conjunction with the size to determine if the cache use is being potentially limited by its maximum size.
public void setMaxSize(int maxSize)
public int getHitRatio()
A hit ratio of 100 means every get request against the cache hits an entry.
Copyright © 2014. All Rights Reserved.