Interface CPUMonitor
- All Superinterfaces:
ResourceMonitor<Long>
A
ResourceMonitor
for the
ResourceMonitoringService.RES_TYPE_CPU
resource type. CPUMonitor
instance monitors the CPU consumed by a ResourceContext
instance.-
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the CPU usage as a cumulative number of nanosecondsMethods inherited from interface org.osgi.service.resourcemonitoring.ResourceMonitor
delete, disable, enable, equals, getContext, getMonitoredPeriod, getResourceType, getSamplingPeriod, getUsage, hashCode, isDeleted, isEnabled
-
Method Details
-
getCPUUsage
long getCPUUsage()Returns the CPU usage as a cumulative number of nanosecondsThe
ResourceMonitor.getUsage()
method returns the same value, wrapped in a long.- Returns:
- the CPU usage in nanoseconds
-