Interface MemoryMonitor
- All Superinterfaces:
ResourceMonitor<Long>
A
ResourceMonitor
for the
ResourceMonitoringService.RES_TYPE_MEMORY
resource type. A
MemoryMonitor instance monitors and limits the memory used by a
ResourceContext
instance.-
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the size of the java heap used by the bundles in this resource context.Methods inherited from interface org.osgi.service.resourcemonitoring.ResourceMonitor
delete, disable, enable, equals, getContext, getMonitoredPeriod, getResourceType, getSamplingPeriod, getUsage, hashCode, isDeleted, isEnabled
-
Method Details
-
getMemoryUsage
long getMemoryUsage()Returns the size of the java heap used by the bundles in this resource context.The
ResourceMonitor.getUsage()
method returns the same value, wrapped in a long.- Returns:
- the size of the used java heap in bytes
-