|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.cas.monitor.SimpleCacheStatistics
public class SimpleCacheStatistics
Simple implementation of cache statistics.
| Constructor Summary | |
|---|---|
SimpleCacheStatistics(long size,
long capacity,
long evictions)
Creates a new instance with given parameters. |
|
SimpleCacheStatistics(long size,
long capacity,
long evictions,
String name)
Creates a new named instance with given parameters. |
|
| Method Summary | |
|---|---|
long |
getCapacity()
Gets the current capacity of the cache in a unit specific to the cache being monitored (e.g. |
long |
getEvictions()
Gets the number of items evicted from the cache in order to make space for new items. |
String |
getName()
Gets a descriptive name of the cache instance for which statistics apply. |
int |
getPercentFree()
Gets the percent free capacity remaining in the cache. |
long |
getSize()
Gets the current size of the cache in a unit specific to the cache being monitored (e.g. |
void |
toString(StringBuilder builder)
Writes a string representation of cache statistics to the given string builder. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleCacheStatistics(long size,
long capacity,
long evictions)
size - Current cache size (e.g. items, bytes, etc).capacity - Current cache capacity (e.g. items, bytes, etc). The units of capacity must be equal to size
in order to produce a meaningful value for getPercentFree().evictions - Number of evictions reported by cache.
public SimpleCacheStatistics(long size,
long capacity,
long evictions,
String name)
size - Current cache size (e.g. items, bytes, etc).capacity - Current cache capacity (e.g. items, bytes, etc). The units of capacity must be equal to size
in order to produce a meaningful value for getPercentFree().evictions - Number of evictions reported by cache.name - Name of cache instance to which statistics apply.| Method Detail |
|---|
public long getSize()
CacheStatistics
getSize in interface CacheStatisticspublic long getCapacity()
CacheStatistics
getCapacity in interface CacheStatisticspublic long getEvictions()
CacheStatistics
getEvictions in interface CacheStatisticspublic int getPercentFree()
CacheStatistics
getPercentFree in interface CacheStatisticspublic void toString(StringBuilder builder)
CacheStatistics
toString in interface CacheStatisticsbuilder - String builder to which string representation is appended.public String getName()
getName in interface CacheStatistics
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||