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.- Version:
- 1.0
- Author:
- $Id: a3444aabb30bc1fe153df23d964ab43fc1076579 $
-
Method Summary
Modifier and TypeMethodDescriptionlongReturns the size of the java heap used by the bundles in this resource context.Methods inherited from interface 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
-