public class GangliaMetricMessage extends AbstractGangliaMessage implements IGangliaMetricMessage
Constructor and Description |
---|
GangliaMetricMessage(GangliaMessageTypeEnum recordType,
String hostName,
String metricName,
boolean spoof,
String format,
Object value)
Constructor from data.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getFormat()
The printf format string associated with the metric value.
|
Number |
getNumericValue()
Return the
Number for the metric value. |
String |
getStringValue()
Return a String representation of the metric value (always succeeds).
|
Object |
getValue()
Return the metric value (non-
null ). |
int |
hashCode() |
boolean |
isMetricMetadata()
Return
true iff this message contains the metadata for a
metric (the metric declaration). |
boolean |
isMetricRequest()
Return
true iff this message is a request for a metric. |
boolean |
isMetricValue()
Return
true if this message represents a metric value. |
boolean |
isNumeric()
Return
true if the metric value is a numeric, in which case
it can be cast to a Number . |
String |
toString() |
getHostName, getMetricName, getRecordType, isSpoof
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getHostName, getMetricName, getRecordType, isSpoof
public GangliaMetricMessage(GangliaMessageTypeEnum recordType, String hostName, String metricName, boolean spoof, String format, Object value)
recordType
- hostName
- metricName
- spoof
- format
- value
- public boolean isMetricValue()
IGangliaMessage
true
if this message represents a metric value.isMetricValue
in interface IGangliaMessage
public boolean isMetricRequest()
IGangliaMessage
true
iff this message is a request for a metric.isMetricRequest
in interface IGangliaMessage
GangliaMessageTypeEnum.REQUEST
public boolean isMetricMetadata()
IGangliaMessage
true
iff this message contains the metadata for a
metric (the metric declaration).isMetricMetadata
in interface IGangliaMessage
GangliaMessageTypeEnum.METADATA
public String getFormat()
IGangliaMetricMessage
getFormat
in interface IGangliaMetricMessage
public boolean isNumeric()
IGangliaMetricMessage
true
if the metric value is a numeric, in which case
it can be cast to a Number
.isNumeric
in interface IGangliaMetricMessage
public Object getValue()
IGangliaMetricMessage
null
).getValue
in interface IGangliaMetricMessage
public String getStringValue()
IGangliaMetricMessage
getStringValue
in interface IGangliaMetricMessage
public Number getNumericValue()
IGangliaMetricMessage
Number
for the metric value.getNumericValue
in interface IGangliaMetricMessage
public boolean equals(Object o)
equals
in class AbstractGangliaMessage
public int hashCode()
hashCode
in class AbstractGangliaMessage
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.