public class MetricsMap extends Object implements com.codahale.metrics.Gauge<Map<String,Object>>, DynamicMBean
MetricSet
 where each metric had to be known in advance and registered separately in MetricRegistry.
 Note: this awkwardly extends Gauge and not Metric because awkwardly Metric instances
 are not supported by MetricRegistryListener :(
Note 2: values added to this metric map should belong to the list of types supported by JMX:
 OpenType.ALLOWED_CLASSNAMES_LIST, otherwise only their toString()
 representation will be shown in JConsole.
| Constructor and Description | 
|---|
| MetricsMap(BiConsumer<Boolean,Map<String,Object>> initializer) | 
| Modifier and Type | Method and Description | 
|---|---|
| Object | getAttribute(String attribute) | 
| AttributeList | getAttributes(String[] attributes) | 
| MBeanInfo | getMBeanInfo() | 
| Map<String,Object> | getValue() | 
| Map<String,Object> | getValue(boolean detailed) | 
| Object | invoke(String actionName,
      Object[] params,
      String[] signature) | 
| void | setAttribute(Attribute attribute) | 
| AttributeList | setAttributes(AttributeList attributes) | 
| String | toString() | 
public MetricsMap(BiConsumer<Boolean,Map<String,Object>> initializer)
public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException
getAttribute in interface DynamicMBeanAttributeNotFoundExceptionMBeanExceptionReflectionExceptionpublic void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
setAttribute in interface DynamicMBeanAttributeNotFoundExceptionInvalidAttributeValueExceptionMBeanExceptionReflectionExceptionpublic AttributeList getAttributes(String[] attributes)
getAttributes in interface DynamicMBeanpublic AttributeList setAttributes(AttributeList attributes)
setAttributes in interface DynamicMBeanpublic Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException
invoke in interface DynamicMBeanMBeanExceptionReflectionExceptionpublic MBeanInfo getMBeanInfo()
getMBeanInfo in interface DynamicMBeanCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.