Interface ThreadMonitor

All Superinterfaces:
ResourceMonitor<Integer>

public interface ThreadMonitor extends ResourceMonitor<Integer>
A ResourceMonitor for the ResourceMonitoringService.RES_TYPE_THREADS resource type. A ThreadMonitor instance monitors and limits the thread created by a ResourceContext instance.
  • Method Details

    • 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