public class MetricsSystemImpl extends Object implements MetricsSystem
MetricsSystem.AbstractCallback, MetricsSystem.Callback| 构造器和说明 |
|---|
MetricsSystemImpl()
Construct the system but not initializing (read config etc.) it.
|
MetricsSystemImpl(String prefix)
Construct the metrics system
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
currentConfig() |
void |
init(String prefix)
Initialized the metrics system with a prefix.
|
void |
publishMetricsNow()
Requests an immediate publish of all metrics from sources to sinks.
|
void |
refreshMBeans()
Force a refresh of MBeans
|
void |
register(MetricsSystem.Callback callback)
Register a callback interface for JMX events
|
<T extends MetricsSink> |
register(String name,
String description,
T sink)
Register a metrics sink
|
<T extends MetricsSource> |
register(String name,
String desc,
T source)
Register a metrics source
|
void |
shutdown()
Shutdown the metrics system completely (usually during server shutdown.)
|
void |
start()
Start the metrics system
|
void |
stop()
Stop the metrics system
|
public MetricsSystemImpl(String prefix)
prefix - for the systempublic MetricsSystemImpl()
public void init(String prefix)
prefix - the system will look for configs with the prefixpublic void start()
MetricsSystemMXBeanstart 在接口中 MetricsSystemMXBeanpublic void stop()
MetricsSystemMXBeanstop 在接口中 MetricsSystemMXBeanpublic <T extends MetricsSource> T register(String name, String desc, T source)
MetricsSystemregister 在接口中 MetricsSystemT - the type of the sourcename - of the source. Must be unique.desc - the description of the source.source - to registerpublic <T extends MetricsSink> T register(String name, String description, T sink)
MetricsSystemregister 在接口中 MetricsSystemT - the type of the sinkname - of the sink. Must be unique.description - the description of the sinksink - to registerpublic void register(MetricsSystem.Callback callback)
MetricsSystemregister 在接口中 MetricsSystemcallback - the callback object implementing the MBean interface.public void refreshMBeans()
MetricsSystemMXBeanrefreshMBeans 在接口中 MetricsSystemMXBeanpublic String currentConfig()
currentConfig 在接口中 MetricsSystemMXBeanpublic void publishMetricsNow()
publishMetricsNow 在接口中 MetricsSystempublic void shutdown()
MetricsSystemshutdown 在接口中 MetricsSystemCopyright © 2009 The Apache Software Foundation