public class TimeMetricsCollector extends SystemMetricsCollector<TimeMetrics>
Constructor and Description |
---|
TimeMetricsCollector() |
Modifier and Type | Method and Description |
---|---|
TimeMetrics |
createMetrics()
Creates an empty instance of the corresponding system metrics.
|
boolean |
getSnapshot(TimeMetrics snapshot)
Note that access to snapshot instances is not synchronized and must be taken care of
by the caller requesting getSnapshot.
|
public boolean getSnapshot(TimeMetrics snapshot)
SystemMetricsCollector
getSnapshot
in class SystemMetricsCollector<TimeMetrics>
snapshot
- snapshot on which the data will be writtenpublic TimeMetrics createMetrics()
SystemMetricsCollector
Explicitly having this function available reduces a significant amount of boilerplate
createMetrics
in class SystemMetricsCollector<TimeMetrics>