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)
MetricPlugin
Returns 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 MetricPlugin
name
- the name (could be the name of the metric root hierarchy)public Metric metric()
MetricPlugin
Returns the default Metric
instance
Note the plugin shall always return the same instance with this method call
metric
in interface MetricPlugin
public MetricStore metricStore()
MetricPlugin
Returns a MetricStore
instance.
Note the plugin shall always returns the same instance
metricStore
in interface MetricPlugin
public void enableDataSync(boolean sync)
MetricPlugin
Enable/Disable metric data sync to persistent store
enableDataSync
in interface MetricPlugin
sync
- true
if enable sync data, false
otherwiseCopyright © 2014–2017 ActFramework. All rights reserved.