public abstract class SolrMetricReporter extends Object implements Closeable, PluginInfoInitialized
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
enabled |
protected SolrMetricManager |
metricManager |
protected int |
period |
protected PluginInfo |
pluginInfo |
protected String |
registryName |
| Modifier | Constructor and Description |
|---|---|
protected |
SolrMetricReporter(SolrMetricManager metricManager,
String registryName)
Create a reporter for metrics managed in a named registry.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doInit()
Reporter initialization implementation.
|
int |
getPeriod() |
PluginInfo |
getPluginInfo()
Get the effective
PluginInfo instance that was used for
initialization of this plugin. |
void |
init(PluginInfo pluginInfo)
Initializes a
SolrMetricReporter with the plugin's configuration. |
void |
setEnabled(Boolean enabled)
Enable reporting, defaults to true.
|
void |
setPeriod(int period) |
String |
toString() |
protected abstract void |
validate()
Validates that the reporter has been correctly configured.
|
protected final String registryName
protected final SolrMetricManager metricManager
protected PluginInfo pluginInfo
protected boolean enabled
protected int period
protected SolrMetricReporter(SolrMetricManager metricManager, String registryName)
registryName - registry to use, one of registries managed by
SolrMetricManagerpublic void init(PluginInfo pluginInfo)
SolrMetricReporter with the plugin's configuration.init in interface PluginInfoInitializedpluginInfo - the plugin's configurationprotected abstract void doInit()
public void setEnabled(Boolean enabled)
init(PluginInfo) checks
this flag before calling doInit() to initialize reporting.enabled - - whether or not reporting is to be enabledpublic void setPeriod(int period)
period - - in secondspublic int getPeriod()
public PluginInfo getPluginInfo()
PluginInfo instance that was used for
initialization of this plugin.protected abstract void validate()
throws IllegalStateException
IllegalStateException - if the reporter is not properly configuredCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.