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(@Nullable T b, @Nullable T output)
b
- output
- public abstract T diff(@Nullable T b, @Nullable T output)
b
- output
- public abstract T set(T b)
b
- public T sum(@Nullable T b)
sum(SystemMetrics, SystemMetrics)
which always
allocates a new output object.b
- public T diff(@Nullable T b)
diff(SystemMetrics, SystemMetrics)
which always
allocates a new output object.b
-