public class SimpleMetricPlugin extends java.lang.Object implements MetricPlugin
A simple implementation of MetricPlugin
| Modifier and Type | Class and Description |
|---|---|
static class |
SimpleMetricPlugin.SimpleMetricPersistService |
| Constructor and Description |
|---|
SimpleMetricPlugin() |
| Modifier and Type | Method and Description |
|---|---|
void |
enableDataSync(boolean sync)
Enable/Disable metric data sync to persistent store
|
Metric |
metric()
Returns the default
Metric instance |
Metric |
metric(java.lang.String name)
Returns a
Metric instance by name |
MetricStore |
metricStore()
Returns a
MetricStore instance. |
public Metric metric(java.lang.String name)
MetricPluginReturns a Metric instance by name
The plugin shall check if a Logger get by name metric.$name is trace enabled to return the real Metric instance, otherwise then it shall return the the do-nothing metric instance
metric in interface MetricPluginname - the name (could be the name of the metric root hierarchy)public Metric metric()
MetricPluginReturns the default Metric instance
Note the plugin shall always return the same instance with this method call
metric in interface MetricPluginpublic MetricStore metricStore()
MetricPluginReturns a MetricStore instance.
Note the plugin shall always returns the same instance
metricStore in interface MetricPluginpublic void enableDataSync(boolean sync)
MetricPluginEnable/Disable metric data sync to persistent store
enableDataSync in interface MetricPluginsync - true if enable sync data, false otherwiseCopyright © 2014–2017 ActFramework. All rights reserved.