Package org.onosproject.cpman
Class ControlLoadSnapshot
- java.lang.Object
-
- org.onosproject.cpman.ControlLoadSnapshot
-
public class ControlLoadSnapshot extends Object
A 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(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.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
-
-