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()
MetricsSystemMXBean
start
在接口中 MetricsSystemMXBean
public void stop()
MetricsSystemMXBean
stop
在接口中 MetricsSystemMXBean
public <T extends MetricsSource> T register(String name, String desc, T source)
MetricsSystem
register
在接口中 MetricsSystem
T
- 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)
MetricsSystem
register
在接口中 MetricsSystem
T
- the type of the sinkname
- of the sink. Must be unique.description
- the description of the sinksink
- to registerpublic void register(MetricsSystem.Callback callback)
MetricsSystem
register
在接口中 MetricsSystem
callback
- the callback object implementing the MBean interface.public void refreshMBeans()
MetricsSystemMXBean
refreshMBeans
在接口中 MetricsSystemMXBean
public String currentConfig()
currentConfig
在接口中 MetricsSystemMXBean
public void publishMetricsNow()
publishMetricsNow
在接口中 MetricsSystem
public void shutdown()
MetricsSystem
shutdown
在接口中 MetricsSystem
Copyright © 2009 The Apache Software Foundation