Class CacheInfo
- java.lang.Object
-
- com.xwiki.admintools.health.cache.CacheInfo
-
@Unstable public class CacheInfo extends Object
Holds JMX-exposed information regarding the name, eviction limit, and size for a single cache.- Since:
- 1.4
- Version:
- $Id$
-
-
Constructor Summary
Constructors Constructor Description CacheInfo()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCacheName()longgetEvictionSize()StringgetFormattedCacheSize()Get a formatted display of the cache load level, expressed as numberOfEntries/evictionSize.longgetNumberOfEntries()voidsetCacheName(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.
-
-
-
Method Detail
-
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
public String getCacheName()
- Returns:
- the cache name
-
setCacheName
public void setCacheName(String cacheName)
Set the name of the cache.- Parameters:
cacheName- name of the cache
-
getFormattedCacheSize
public String getFormattedCacheSize()
Get a formatted display of the cache load level, expressed as numberOfEntries/evictionSize.- Returns:
- a formatted display of the cache size
-
-