public class MetricsMBeanImpl extends Object implements MetricsMBean
Constructor and Description |
---|
MetricsMBeanImpl() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all the keys and values from this MetricsMBean.
|
Object |
get(String name) |
Object |
getAttribute(String arg0) |
AttributeList |
getAttributes(String[] arg0) |
MBeanInfo |
getMBeanInfo() |
boolean |
hasKey(String name)
Check if we're tracking a certain named key/metric
|
Object |
invoke(String name,
Object[] args,
String[] signature) |
void |
put(String name,
Object value)
Add a key/metric and its value to track
|
void |
reset() |
void |
setAttribute(Attribute attr) |
AttributeList |
setAttributes(AttributeList arg0) |
public Object getAttribute(String arg0) throws AttributeNotFoundException, MBeanException, ReflectionException
getAttribute
in interface DynamicMBean
AttributeNotFoundException
MBeanException
ReflectionException
public AttributeList getAttributes(String[] arg0)
getAttributes
in interface DynamicMBean
public MBeanInfo getMBeanInfo()
getMBeanInfo
in interface DynamicMBean
public Object invoke(String name, Object[] args, String[] signature) throws MBeanException, ReflectionException
invoke
in interface DynamicMBean
MBeanException
ReflectionException
public void setAttribute(Attribute attr) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
setAttribute
in interface DynamicMBean
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException
public AttributeList setAttributes(AttributeList arg0)
setAttributes
in interface DynamicMBean
public boolean hasKey(String name)
MetricsMBean
hasKey
in interface MetricsMBean
public void put(String name, Object value) throws IOException
MetricsMBean
put
in interface MetricsMBean
name
- Name of the key/metricvalue
- value associated with the keyIOException
public Object get(String name) throws IOException
get
in interface MetricsMBean
IOException
public void reset()
public void clear()
MetricsMBean
clear
in interface MetricsMBean
Copyright © 2016 The Apache Software Foundation. All rights reserved.