public class QueryAttribute extends Object
collectMetrics(javax.management.ObjectName, Object, long, java.util.Queue)).| Modifier and Type | Field and Description |
|---|---|
protected ResultNameStrategy |
resultNameStrategy |
| Constructor and Description |
|---|
QueryAttribute(String name,
String type,
String resultAlias) |
QueryAttribute(String name,
String type,
String resultAlias,
Collection<String> keys) |
| Modifier and Type | Method and Description |
|---|---|
QueryAttribute |
addKeys(Collection<String> newKeys) |
int |
collectMetrics(ObjectName objectName,
Object value,
long epochInMillis,
Queue<QueryResult> results) |
String |
getName() |
Query |
getQuery()
|
String |
getResultAlias() |
String |
getType() |
void |
setQuery(Query query) |
String |
toString() |
protected ResultNameStrategy resultNameStrategy
public QueryAttribute(@Nonnull String name, @Nullable String type, @Nullable String resultAlias)
name - name of the JMX attributetype - type of the metric (e.g. "counter", "gauge", ...)resultAlias - name of the result that will be exportedpublic QueryAttribute(@Nonnull String name, @Nullable String type, @Nullable String resultAlias, @Nullable Collection<String> keys)
name - name of the JMX attributetype - type of the metric (e.g. "counter", "gauge", ...)resultAlias - name of the result that will be exportedkeys - of the CompositeData to collectpublic Query getQuery()
Query.addAttribute(QueryAttribute)public void setQuery(Query query)
public int collectMetrics(@Nonnull ObjectName objectName, @Nonnull Object value, long epochInMillis, @Nonnull Queue<QueryResult> results)
objectName - objectName on which the attribute was obtained.value - value of the given attribute. A 'simple' value (String, Number, Date)
or a CompositeDataepochInMillis - time at which the metric was collectedresults - queue to which the the computed result(s) must be added@Nonnull public QueryAttribute addKeys(@Nullable Collection<String> newKeys)
thisCopyright © 2014. All Rights Reserved.