Interface ThreadMonitor
-
- All Superinterfaces:
ResourceMonitor<java.lang.Integer>
public interface ThreadMonitor extends ResourceMonitor<java.lang.Integer>
AResourceMonitor
for theResourceMonitoringService.RES_TYPE_THREADS
resource type. A ThreadMonitor instance monitors and limits the thread created by aResourceContext
instance.- Version:
- 1.0
- Author:
- $Id: b5d1a7049fd928b82a428aa1d23de201b243a506 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getAliveThreads()
Returns the number of alive threads created 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
-
getAliveThreads
int getAliveThreads()
Returns the number of alive threads created by the bundles in this resource context. A Thread is considered to be alive when its java state is one of the following:- RUNNABLE
- BLOCKED
- WAITING
- TIMED_WAITING
The
ResourceMonitor.getUsage()
method returns the same value, wrapped in a int.- Returns:
- the number of alive threads created by this resource context
-
-