public abstract class JmxAttribute extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ALIAS |
protected static String |
CASSANDRA_DOMAIN |
protected static org.apache.log4j.Logger |
LOGGER |
protected static String |
METRIC_TYPE |
protected String[] |
tags |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getAlias()
Overload `getAlias` method.
|
protected String |
getAlias(String field)
Get attribute alias.
|
ObjectName |
getBeanName() |
protected HashMap<String,String> |
getBeanParameters() |
static HashMap<String,String> |
getBeanParametersHash(String beanParametersString)
Gets bean parameter hash map.
|
protected String |
getDomain() |
static List<String> |
getExcludedBeanParams() |
Configuration |
getMatchingConf()
Gets the matching configuration for the attribute.
|
abstract LinkedList<HashMap<String,Object>> |
getMetrics() |
int |
getMetricsCount()
Gets the metric count for the attribute.
|
protected String[] |
getTags() |
abstract boolean |
match(Configuration conf)
An abstract function implemented in the inherited classes JmxSimpleAttribute and
JmxComplexAttribute.
|
protected Boolean |
renameCassandraMetrics() |
void |
setMatchingConf(Configuration matchingConf)
Sets a matching configuration for the attribute.
|
String |
toString()
Returns string reprensentation of JMX Attribute.
|
protected static final String ALIAS
protected static final String METRIC_TYPE
protected static final org.apache.log4j.Logger LOGGER
protected static final String CASSANDRA_DOMAIN
protected String[] tags
public static HashMap<String,String> getBeanParametersHash(String beanParametersString)
protected Boolean renameCassandraMetrics()
public String toString()
public abstract LinkedList<HashMap<String,Object>> getMetrics() throws AttributeNotFoundException, InstanceNotFoundException, MBeanException, ReflectionException, IOException
public abstract boolean match(Configuration conf)
conf - Configuration a Configuration object that will be used to check if the Jmx
Attribute match this configurationpublic int getMetricsCount()
public Configuration getMatchingConf()
public void setMatchingConf(Configuration matchingConf)
public ObjectName getBeanName()
protected String getAlias(String field)
In order, tries to: * Use `alias_match` to generate an alias with a regular expression * Use `alias` directly * Create an generic alias prefixed with user's `metric_prefix` preference or default to `jmx`
Argument(s): * (Optional) `field` `Null` for `JmxSimpleAttribute`.
protected String getAlias()
Note: used for `JmxSimpleAttribute` only, as `field` is null.
protected String[] getTags()
protected String getDomain()
Copyright © 2019. All rights reserved.