Package org.opennms.nrtg.api.model
Class LightweightMeasurementSet
- java.lang.Object
-
- org.opennms.nrtg.api.model.LightweightMeasurementSet
-
- All Implemented Interfaces:
java.io.Serializable
,MeasurementSet
public class LightweightMeasurementSet extends java.lang.Object implements MeasurementSet
Result of aCollectionJob
. List of metricId/values pairs with minimal redundancy (timestamp, nodeId, service and interface are stored only once). The list ofMeasurement
will be generated on the fly.- Author:
- Christian Pape, Markus Neumann
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LightweightMeasurementSet()
LightweightMeasurementSet(int nodeId, java.lang.String service, java.lang.String theInterface, java.util.Date timestamp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMeasurement(java.lang.String metricId, java.lang.String metricType, java.lang.String value, java.lang.String onmsLogicMetricId)
java.lang.String
getJson()
java.util.List<Measurement>
getMeasurements()
java.lang.String
getNetInterface()
int
getNodeId()
java.lang.String
getService()
java.util.Date
getTimestamp()
void
setNetInterface(java.lang.String theInterface)
void
setNodeId(int nodeId)
void
setService(java.lang.String service)
void
setTimestamp(java.util.Date timestamp)
java.lang.String
toString()
This toString method is for displaying reasons in the webapp NrtGrapher only.
-
-
-
Method Detail
-
addMeasurement
public void addMeasurement(java.lang.String metricId, java.lang.String metricType, java.lang.String value, java.lang.String onmsLogicMetricId)
-
getMeasurements
public java.util.List<Measurement> getMeasurements()
- Specified by:
getMeasurements
in interfaceMeasurementSet
-
setNodeId
public void setNodeId(int nodeId)
-
setNetInterface
public void setNetInterface(java.lang.String theInterface)
-
setService
public void setService(java.lang.String service)
-
setTimestamp
public void setTimestamp(java.util.Date timestamp)
-
getNodeId
public int getNodeId()
-
getNetInterface
public java.lang.String getNetInterface()
-
getService
public java.lang.String getService()
-
getTimestamp
public java.util.Date getTimestamp()
-
getJson
public java.lang.String getJson()
- Specified by:
getJson
in interfaceMeasurementSet
-
toString
public java.lang.String toString()
This toString method is for displaying reasons in the webapp NrtGrapher only. It's for prototyping only.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a
String
that contains the metrics and there values in a easy parsable way.
-
-