Package org.onosproject.net.statistic
Class DefaultLoad
- java.lang.Object
- 
- org.onosproject.net.statistic.DefaultLoad
 
- 
- 
Constructor SummaryConstructors Constructor Description DefaultLoad()Creates an invalid load.DefaultLoad(long current, long previous)Creates a load value from the parameters.DefaultLoad(long current, long previous, long interval)Creates a load value from the parameters.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisValid()Indicates whether this load was built on valid values.longlatest()Obtain the latest bytes counter viewed on that link.longrate()Obtain the current observed rate (in bytes/s) on a link.static voidsetPollInterval(long newPollInterval)Sets the poll interval in seconds.longtime()Returns when this value was seen.java.lang.StringtoString()
 
- 
- 
- 
Constructor Detail- 
DefaultLoadpublic DefaultLoad() Creates an invalid load.
 - 
DefaultLoadpublic DefaultLoad(long current, long previous)Creates a load value from the parameters.- Parameters:
- current- the current value
- previous- the previous value
 
 - 
DefaultLoadpublic DefaultLoad(long current, long previous, long interval)Creates a load value from the parameters.- Parameters:
- current- the current value
- previous- the previous value
- interval- poll interval for this load
 
 
- 
 - 
Method Detail- 
setPollIntervalpublic static void setPollInterval(long newPollInterval) Sets the poll interval in seconds. Used solely for the purpose of computing the load.- Parameters:
- newPollInterval- poll interval duration in seconds
 
 - 
ratepublic long rate() Description copied from interface:LoadObtain the current observed rate (in bytes/s) on a link.
 - 
latestpublic long latest() Description copied from interface:LoadObtain the latest bytes counter viewed on that link.
 - 
isValidpublic boolean isValid() Description copied from interface:LoadIndicates whether this load was built on valid values.
 - 
timepublic long time() Description copied from interface:LoadReturns when this value was seen.
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-