| Constructor and 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.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isValid()
Indicates whether this load was built on valid values.
|
long |
latest()
Obtain the latest bytes counter viewed on that link.
|
long |
rate()
Obtain the current observed rate (in bytes/s) on a link.
|
static void |
setPollInterval(long newPollInterval)
Sets the poll interval in seconds.
|
long |
time()
Returns when this value was seen.
|
java.lang.String |
toString() |
public DefaultLoad()
public DefaultLoad(long current,
long previous)
current - the current valueprevious - the previous valuepublic DefaultLoad(long current,
long previous,
long interval)
current - the current valueprevious - the previous valueinterval - poll interval for this loadpublic static void setPollInterval(long newPollInterval)
newPollInterval - poll interval duration in secondspublic long rate()
Loadpublic long latest()
Loadpublic boolean isValid()
Loadpublic long time()
Loadpublic java.lang.String toString()
toString in class java.lang.Object