Top Description Methods
org.osgi.service.resourcemonitoring.monitor

public Interface CPUMonitor

extends ResourceMonitor<Long>
Imports
org.osgi.service.resourcemonitoring.ResourceContext, .ResourceMonitor, .ResourceMonitoringService

A ResourceMonitor for the ResourceMonitoringService#RES_TYPE_CPU resource type. CPUMonitor instance monitors the CPU consumed by a ResourceContext instance.
Author
$Id: 6b91995460f86fe796787e76546ace777fc62bff $
Version
1.0

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

the CPU usage in nanoseconds
getCPUUsage
()

Returns the CPU usage as a cumulative number of nanoseconds

The getUsage() method returns the same value, wrapped in a long.

Inherited from org.osgi.service.resourcemonitoring.ResourceMonitor:
deletedisableenableequalsgetContextgetMonitoredPeriodgetResourceTypegetSamplingPeriodgetUsagehashCodeisDeletedisEnabled

Method Detail

getCPUUsageback to summary
public long getCPUUsage()

Returns the CPU usage as a cumulative number of nanoseconds

The getUsage() method returns the same value, wrapped in a long.

Returns:long

the CPU usage in nanoseconds