Class JMXResolver

java.lang.Object
org.deltava.util.jmx.JMXResolver
All Implemented Interfaces:
JMXRefresh, ResolverMXBean

public class JMXResolver extends Object implements ResolverMXBean, JMXRefresh
A JMX bean to export DNS resolver statistics.
Since:
12.4
Version:
12.4
Author:
Luke
  • Constructor Details

    • JMXResolver

      public JMXResolver(String code, Resolver solv)
      Creates the bean.
      Parameters:
      code - the application code
      solv - the DNS resolver
  • Method Details

    • getCode

      public String getCode()
      Description copied from interface: ResolverMXBean
      Returns the application code.
      Specified by:
      getCode in interface ResolverMXBean
      Returns:
      the code
    • getThreads

      public Integer getThreads()
      Description copied from interface: ResolverMXBean
      Returns the number of resolver threads.
      Specified by:
      getThreads in interface ResolverMXBean
      Returns:
      the number of threads
    • getRequests

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

      public Long getHits()
      Description copied from interface: ResolverMXBean
      Returns the number of successful requests made to this resolver.
      Specified by:
      getHits in interface ResolverMXBean
      Returns:
      the number of hits
    • getMisses

      public Long getMisses()
      Description copied from interface: ResolverMXBean
      Returns the number of unsuccessful requests made to this resolver.
      Specified by:
      getMisses in interface ResolverMXBean
      Returns:
      the number of misses
    • getRejected

      public Long getRejected()
      Description copied from interface: ResolverMXBean
      Returns the number of rejected requests made to this resolve.
      Specified by:
      getRejected in interface ResolverMXBean
      Returns:
      the number of rejected requests
    • getHitRate

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

      public void update()
      Description copied from interface: JMXRefresh
      Updates the JMX statistics.
      Specified by:
      update in interface JMXRefresh