Class CacheInfo
java.lang.Object
com.xwiki.admintools.health.cache.CacheInfo
Holds JMX-exposed information regarding the name, eviction limit, and size for a single cache.
- Since:
- 1.4
- Version:
- $Id$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongGet a formatted display of the cache load level, expressed as numberOfEntries/evictionSize.longvoidsetCacheName(String cacheName) Set the name of the cache.voidsetEvictionSize(long evictionSize) Set the maximum eviction size for the cache.voidsetNumberOfEntries(long numberOfEntries) Set the current number of entries stored in the cache.
-
Constructor Details
-
CacheInfo
public CacheInfo()Default constructor.
-
-
Method Details
-
getEvictionSize
public long getEvictionSize()- Returns:
- the eviction size
-
setEvictionSize
public void setEvictionSize(long evictionSize) Set the maximum eviction size for the cache. This represents the configured upper limit after which entries may be evicted.- Parameters:
evictionSize- the configured eviction size for the cache
-
getNumberOfEntries
public long getNumberOfEntries()- Returns:
- the number of entries
-
setNumberOfEntries
public void setNumberOfEntries(long numberOfEntries) Set the current number of entries stored in the cache.- Parameters:
numberOfEntries- the current number of cache entries
-
getCacheName
- Returns:
- the cache name
-
setCacheName
Set the name of the cache.- Parameters:
cacheName- name of the cache
-
getFormattedCacheSize
Get a formatted display of the cache load level, expressed as numberOfEntries/evictionSize.- Returns:
- a formatted display of the cache size
-