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

      • CacheInfo

        public CacheInfo()
        Default constructor.
    • Method Detail

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

        public void setNumberOfEntries​(long numberOfEntries)
        Set the current number of entries stored in the cache.
        Parameters:
        numberOfEntries - the current number of cache entries
      • 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