public abstract class SystemMetrics<T extends SystemMetrics<T>>
extends java.lang.Object
implements java.io.Serializable
The are simply monoids, and can be added/subtracted with utility functions to reset.
| Constructor and Description |
|---|
SystemMetrics() |
| Modifier and Type | Method and Description |
|---|---|
T |
diff(T b)
Convenience wrapper over
diff(SystemMetrics, SystemMetrics) which always
allocates a new output object. |
abstract T |
diff(T b,
T output)
Subtract the object passed in from the current object.
|
abstract T |
set(T b)
Sets all fields in this to values from the SystemMetrics object passed in: a _deep_ copy that
shouldn't share any values with other metrics objects.
|
T |
sum(T b)
Convenience wrapper over
sum(SystemMetrics, SystemMetrics) which always
allocates a new output object. |
abstract T |
sum(T b,
T output)
Add values from the SystemMetrics object passed in and sets them on the output object, if
available.
|
public abstract T sum(T b, T output)
For convenience, this function accepts null values and will allocate an output object if none is passed in.
b - output - public abstract T diff(T b, T output)
For convenience, this function accepts null values and will allocate an output object if none is passed in.
b - output - public abstract T set(T b)
b - public T sum(T b)
sum(SystemMetrics, SystemMetrics) which always
allocates a new output object.b - public T diff(T b)
diff(SystemMetrics, SystemMetrics) which always
allocates a new output object.b -