Interface MemoryMonitor
-
- All Superinterfaces:
ResourceMonitor<java.lang.Long>
public interface MemoryMonitor extends ResourceMonitor<java.lang.Long>
AResourceMonitor
for theResourceMonitoringService.RES_TYPE_MEMORY
resource type. A MemoryMonitor instance monitors and limits the memory used by aResourceContext
instance.- Version:
- 1.0
- Author:
- $Id: a3444aabb30bc1fe153df23d964ab43fc1076579 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getMemoryUsage()
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 Detail
-
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
-
-