public abstract class AbstractMetricsImpl extends Object implements Metrics
Modifier and Type | Class and Description |
---|---|
static class |
AbstractMetricsImpl.Metric |
MASTER_NAME, PREFIX, THRIFT_NAME, TSERVER_NAME
Constructor and Description |
---|
AbstractMetricsImpl() |
Modifier and Type | Method and Description |
---|---|
void |
add(String name,
long time) |
void |
createMetric(String name) |
protected void |
finalize() |
long |
getMetricAvg(String name) |
long |
getMetricCount(String name) |
long |
getMetricMax(String name) |
long |
getMetricMin(String name) |
protected abstract String |
getMetricsPrefix() |
protected abstract ObjectName |
getObjectName() |
boolean |
isEnabled() |
void |
register()
Registers this MBean with the MBean Server
|
void |
register(StandardMBean mbean)
Registers a StandardMBean with the MBean Server
|
public void register(StandardMBean mbean) throws Exception
Exception
public void register() throws Exception
public void createMetric(String name)
public long getMetricCount(String name)
public long getMetricAvg(String name)
public long getMetricMin(String name)
public long getMetricMax(String name)
protected abstract ObjectName getObjectName()
protected abstract String getMetricsPrefix()
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.