Class CacheMBeanImpl

java.lang.Object
org.deltava.util.jmx.CacheMBeanImpl
All Implemented Interfaces:
CacheMBean

public class CacheMBeanImpl extends Object implements CacheMBean
A JMX MBean implementation for caches.
Since:
10.2
Version:
10.2
Author:
Luke
  • Constructor Details

    • CacheMBeanImpl

      CacheMBeanImpl(CacheInfo inf)
      Creates the bean.
      Parameters:
      inf - the CacheInfo
  • Method Details

    • getRequests

      public Long getRequests()
      Description copied from interface: CacheMBean
      Returns the number of requests made to this cache.
      Specified by:
      getRequests in interface CacheMBean
      Returns:
      the number of requests
    • getHits

      public Long getHits()
      Description copied from interface: CacheMBean
      Returns the number of success requests made to this cache.
      Specified by:
      getHits in interface CacheMBean
      Returns:
      the number of hits
    • getName

      public String getName()
      Description copied from interface: CacheMBean
      Returns the cache name.
      Specified by:
      getName in interface CacheMBean
      Returns:
      the name
    • getType

      public String getType()
      Description copied from interface: CacheMBean
      Returns the cache type.
      Specified by:
      getType in interface CacheMBean
      Returns:
      the type name
    • getSize

      public Long getSize()
      Description copied from interface: CacheMBean
      Returns the number of items in the cache.
      Specified by:
      getSize in interface CacheMBean
      Returns:
      the number of items
    • getHitRate

      public Float getHitRate()
      Description copied from interface: CacheMBean
      Returns the cache hit rate percentage.
      Specified by:
      getHitRate in interface CacheMBean
      Returns:
      the percentage, or zero if no requests have been made