public class DeviceSchedulerValue extends java.lang.Object implements CustomGlobalEncoder, java.lang.Comparable
HBScheduler has it's time set to| Constructor and Description |
|---|
DeviceSchedulerValue()
Default constructor required for restore
|
DeviceSchedulerValue(java.lang.Object... args)
Restore data from an array of objects encoded through the encodeGlobalMessage functionn
|
DeviceSchedulerValue(java.lang.String deviceName,
double upTime,
double schedulerTime,
int stratum)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(java.lang.Object o) |
boolean |
copyValues(DeviceSchedulerValue right)
Copy the primitive types within the object.
|
java.lang.Object[] |
encodeGlobalMessage() |
boolean |
equals(java.lang.Object other) |
double |
estimateSchedulerTime(double jvm_time)
Estimate what the device's
HBScheduler time will be based on what it was set to when received. |
java.lang.String |
getDeviceName()
The device name of the device this represents
|
double |
getLastUpdateJVMTime()
The last JVM time of THIS device in milliseconds that we received a message from the device that this object represents
|
double |
getSchedulerTime()
The time that the
HBScheduler of the device this represents has it's time set to |
int |
getStratum()
The Stratum of the device this represents
|
double |
getUpTime()
The JVM uptime of the device this represents in milliseconds
|
DeviceSchedulerValue |
restore(java.lang.Object restore_data)
Decode the data based on how it is encoded.
|
java.lang.String |
toString() |
public DeviceSchedulerValue()
public DeviceSchedulerValue(java.lang.String deviceName,
double upTime,
double schedulerTime,
int stratum)
deviceName - unique deviceName, eg HB-123456upTime - the JVM uptime from when device startedschedulerTime - the time that the device has it's schedule set at the uptimestratum - an index as to how close this device is to the domain time.public DeviceSchedulerValue(java.lang.Object... args)
args - the Object [] argumentspublic boolean copyValues(DeviceSchedulerValue right)
right - the object we are copying from.public double estimateSchedulerTime(double jvm_time)
HBScheduler time will be based on what it was set to when received.jvm_time - the current JVM time on THIS deviceHBScheduler time of the device we are examiningpublic java.lang.Object[] encodeGlobalMessage()
encodeGlobalMessage in interface CustomGlobalEncoderpublic DeviceSchedulerValue restore(java.lang.Object restore_data)
CustomGlobalEncoderrestore in interface CustomGlobalEncoderrestore_data - the encoded or decoded datapublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic java.lang.String getDeviceName()
public double getUpTime()
public double getSchedulerTime()
HBScheduler of the device this represents has it's time set toHBScheduler time of devicepublic int getStratum()
public double getLastUpdateJVMTime()