org.jasig.cas.monitor
Interface CacheStatistics

All Known Implementing Classes:
SimpleCacheStatistics

public interface CacheStatistics

Describes the simplest set of cache statistics that are meaningful for health monitoring.

Since:
3.5.1
Author:
Marvin S. Addison

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.
 

Method Detail

getSize

long getSize()
Gets the current size of the cache in a unit specific to the cache being monitored (e.g. bytes, items, etc).

Returns:
Current cache size.

getCapacity

long getCapacity()
Gets the current capacity of the cache in a unit specific to the cache being monitored (e.g. bytes, items, etc).

Returns:
Current cache capacity.

getEvictions

long getEvictions()
Gets the number of items evicted from the cache in order to make space for new items.

Returns:
Eviction count.

getPercentFree

int getPercentFree()
Gets the percent free capacity remaining in the cache.

Returns:
Percent of space/capacity free.

getName

String getName()
Gets a descriptive name of the cache instance for which statistics apply.

Returns:
Name of cache instance/host to which statistics apply.

toString

void toString(StringBuilder builder)
Writes a string representation of cache statistics to the given string builder.

Parameters:
builder - String builder to which string representation is appended.


Copyright © 2004-2013 Jasig. All Rights Reserved.