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

public Interface MemoryMonitor

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

A ResourceMonitor for the ResourceMonitoringService#RES_TYPE_MEMORY resource type. A MemoryMonitor instance monitors and limits the memory used by a ResourceContext instance.
Author
$Id: a3444aabb30bc1fe153df23d964ab43fc1076579 $
Version
1.0

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

the size of the used java heap in bytes
getMemoryUsage
()

Returns the size of the java heap used by the bundles in this resource context.

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

Method Detail

getMemoryUsageback to summary
public long getMemoryUsage()

Returns the size of the java heap used by the bundles in this resource context.

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

Returns:long

the size of the used java heap in bytes