Package org.onosproject.cpman
Class ControlLoadSnapshot
- java.lang.Object
-
- org.onosproject.cpman.ControlLoadSnapshot
-
public class ControlLoadSnapshot extends java.lang.ObjectA container class that is used to wrap the control metric response.
-
-
Constructor Summary
Constructors Constructor Description ControlLoadSnapshot(long latest, long average, long time)Instantiates a new control metric response with given latest, average, time.ControlLoadSnapshot(long latest, long average, long time, long[] recent)Instantiates a new control metric response with given latest, average, time, recent values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longaverage()Returns average value of control metric.booleanequals(java.lang.Object obj)inthashCode()longlatest()Returns latest value of control metric.long[]recent()Returns a set of historical recent of control metric.longtime()Returns last logging time of control metric.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ControlLoadSnapshot
public ControlLoadSnapshot(long latest, long average, long time)Instantiates a new control metric response with given latest, average, time.- Parameters:
latest- latest value of control metricaverage- average value of control metrictime- last logging time of control metric
-
ControlLoadSnapshot
public ControlLoadSnapshot(long latest, long average, long time, long[] recent)Instantiates a new control metric response with given latest, average, time, recent values.- Parameters:
latest- latest value of control metricaverage- average value of control metrictime- last logging time of control metricrecent- a set of historical data
-
-
Method Detail
-
latest
public long latest()
Returns latest value of control metric.- Returns:
- latest value of control metric
-
time
public long time()
Returns last logging time of control metric.- Returns:
- last logging time of control metric
-
average
public long average()
Returns average value of control metric.- Returns:
- average value of control metric
-
recent
public long[] recent()
Returns a set of historical recent of control metric.- Returns:
- a set of historical recent of control metric
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-