public enum DefaultMetricsSystem extends Enum<DefaultMetricsSystem> implements MetricsSystem
MetricsSystem.AbstractCallback, MetricsSystem.Callback| 枚举常量和说明 |
|---|
INSTANCE
The singleton instance
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
currentConfig() |
static MetricsSystem |
initialize(String prefix)
Common static convenience method to initialize the metrics system
|
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 desc,
T sink)
Register a metrics sink
|
<T extends MetricsSource> |
register(String name,
String desc,
T source)
Register a metrics source
|
static <T extends MetricsSource> |
registerSource(String name,
String desc,
T source)
Common static method to register a source
|
void |
shutdown()
Shutdown the metrics system completely (usually during server shutdown.)
|
void |
start()
Start the metrics system
|
void |
stop()
Stop the metrics system
|
static DefaultMetricsSystem |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static DefaultMetricsSystem[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final DefaultMetricsSystem INSTANCE
public static DefaultMetricsSystem[] values()
for (DefaultMetricsSystem c : DefaultMetricsSystem.values()) System.out.println(c);
public static DefaultMetricsSystem valueOf(String name)
name - 要返回的枚举常量的名称。public static MetricsSystem initialize(String prefix)
prefix - for configurationpublic <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 static <T extends MetricsSource> T registerSource(String name, String desc, T source)
T - type of the sourcename - of the sourcedesc - descriptionsource - the source object to registerpublic <T extends MetricsSink> T register(String name, String desc, T sink)
MetricsSystemregister 在接口中 MetricsSystemT - the type of the sinkname - of the sink. Must be unique.desc - the description of the sinksink - to registerpublic void register(MetricsSystem.Callback callback)
MetricsSystemregister 在接口中 MetricsSystemcallback - the callback object implementing the MBean interface.public void publishMetricsNow()
MetricsSystempublishMetricsNow 在接口中 MetricsSystempublic void start()
MetricsSystemMXBeanstart 在接口中 MetricsSystemMXBeanpublic void stop()
MetricsSystemMXBeanstop 在接口中 MetricsSystemMXBeanpublic void refreshMBeans()
MetricsSystemMXBeanrefreshMBeans 在接口中 MetricsSystemMXBeanpublic String currentConfig()
currentConfig 在接口中 MetricsSystemMXBeanpublic void shutdown()
MetricsSystemshutdown 在接口中 MetricsSystemCopyright © 2009 The Apache Software Foundation