public class SolrJmxReporter extends SolrMetricReporter
SolrMetricReporter
that finds (or creates) a MBeanServer from
the given configuration and registers metrics to it with JMX.metricManager, pluginInfo, registryName
Constructor and Description |
---|
SolrJmxReporter(SolrMetricManager metricManager,
String registryName)
Creates a new instance of
SolrJmxReporter . |
Modifier and Type | Method and Description |
---|---|
void |
close()
Stops the reporter from publishing metrics.
|
MBeanServer |
getMBeanServer()
Retrieves the reporter's MBeanServer.
|
void |
init(PluginInfo pluginInfo)
Initializes the reporter by finding (or creating) a MBeanServer
and registering the metricManager's metric registry.
|
void |
setAgentId(String agentId)
Sets the agent id for a JMX server.
|
void |
setDomain(String domain)
Sets the domain with which MBeans are published.
|
void |
setServiceUrl(String serviceUrl)
Sets the service url for a JMX server.
|
String |
toString() |
protected void |
validate()
Validates that the reporter has been correctly configured.
|
getPluginInfo
public SolrJmxReporter(SolrMetricManager metricManager, String registryName)
SolrJmxReporter
.registryName
- name of the registry to reportpublic void init(PluginInfo pluginInfo)
init
in interface PluginInfoInitialized
init
in class SolrMetricReporter
pluginInfo
- the configuration for the reporterpublic void close()
protected void validate() throws IllegalStateException
validate
in class SolrMetricReporter
IllegalStateException
- if the reporter is not properly configuredpublic void setDomain(String domain)
domain
- the domainpublic void setServiceUrl(String serviceUrl)
serviceUrl
- the service urlpublic void setAgentId(String agentId)
agentId
- the agent idpublic MBeanServer getMBeanServer()
public String toString()
toString
in class SolrMetricReporter
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.