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 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

      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