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)
MetricsSystem
register
在接口中 MetricsSystem
T
- 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)
MetricsSystem
register
在接口中 MetricsSystem
T
- the type of the sinkname
- of the sink. Must be unique.desc
- 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 publishMetricsNow()
MetricsSystem
publishMetricsNow
在接口中 MetricsSystem
public void start()
MetricsSystemMXBean
start
在接口中 MetricsSystemMXBean
public void stop()
MetricsSystemMXBean
stop
在接口中 MetricsSystemMXBean
public void refreshMBeans()
MetricsSystemMXBean
refreshMBeans
在接口中 MetricsSystemMXBean
public String currentConfig()
currentConfig
在接口中 MetricsSystemMXBean
public void shutdown()
MetricsSystem
shutdown
在接口中 MetricsSystem
Copyright © 2009 The Apache Software Foundation