Class SolrJmxReporter

    • Constructor Detail

      • SolrJmxReporter

        public SolrJmxReporter​(SolrMetricManager metricManager,
                               String registryName)
        Creates a new instance of SolrJmxReporter.
        Parameters:
        registryName - name of the registry to report
    • Method Detail

      • getInstanceTag

        public String getInstanceTag()
        For unit tests.
      • close

        public void close()
        Stops the reporter from publishing metrics.
      • setRootName

        public void setRootName​(String rootName)
        Set root name of the JMX hierarchy for this reporter. Default (null or empty) is none, ie. the hierarchy will start from the domain name.
        Parameters:
        rootName - root name of the JMX name hierarchy, or null or empty for default.
      • setDomain

        public void setDomain​(String domain)
        Sets the domain with which MBeans are published. If none is set, the domain defaults to the name of the registry.
        Parameters:
        domain - the domain
      • setServiceUrl

        public void setServiceUrl​(String serviceUrl)
        Sets the service url for a JMX server. Note that this configuration is optional.
        Parameters:
        serviceUrl - the service url
      • setAgentId

        public void setAgentId​(String agentId)
        Sets the agent id for a JMX server. Note that this configuration is optional.
        Parameters:
        agentId - the agent id
      • getAgentId

        public String getAgentId()
        Return configured agentId or null.
      • getServiceUrl

        public String getServiceUrl()
        Return configured serviceUrl or null.
      • getDomain

        public String getDomain()
        Return configured domain or null.
      • getMBeanServer

        public MBeanServer getMBeanServer()
        Return the reporter's MBeanServer.
        Returns:
        the reporter's MBeanServer
      • isActive

        public boolean isActive()
        For unit tests.
        Returns:
        true if this reporter is going to report metrics to JMX.
      • isStarted

        public boolean isStarted()
        For unit tests.
        Returns:
        true if this reporter has been started and is reporting metrics to JMX.