org.apache.synapse.commons.jmx

## Class ThreadingView

- java.lang.Object
- - org.apache.synapse.commons.jmx.ThreadingView

- All Implemented Interfaces:
    ThreadingViewMBean

      public class ThreadingView
      extends Object
      implements ThreadingViewMBean

  ThreadingView can be used to monitor a named thread group over JMX. Data gathered by this monitor can be classified as short term data and long term data. Short term data is the statistics related to last 15 minutes of execution and they get updated every 2 seconds. Long term data is related to last 24 hours of execution and they get updated every 5 minutes. This monitor can also be configured to log a summary of the thread states periodically. If needed a margin can be set for the blocked thread percentage, upon exceeding which a system alert will be logged as a warning. By default both periodic logs and alerts are turned off.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ThreadingView(String threadNamePrefix)`
    `ThreadingView(String threadNamePrefix, boolean periodicLogs, double alertMargin)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `destroy()`
    `double` | `getAvgBlockedWorkerPercentage()`
    `double` | `getAvgUnblockedWorkerPercentage()`
    `String[]` | `getDeadLockedWorkers()`
    `double` | `getLast15MinuteBlockedWorkerPercentage()`
    `double` | `getLast24HourBlockedWorkerPercentage()`
    `double` | `getLast5MinuteBlockedWorkerPercentage()`
    `double` | `getLast8HourBlockedWorkerPercentage()`
    `double` | `getLastHourBlockedWorkerPercentage()`
    `double` | `getLastMinuteBlockedWorkerPercentage()`
    `Date` | `getLastResetTime()`
    `int` | `getTotalWorkerCount()`
    `void` | `reset()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ThreadingView

          public ThreadingView(String threadNamePrefix)

    - #### ThreadingView

          public ThreadingView(String threadNamePrefix,
                               boolean periodicLogs,
                               double alertMargin)

  - ### Method Detail

    - #### destroy

          public void destroy()

    - #### getTotalWorkerCount

          public int getTotalWorkerCount()

      Specified by:
        `getTotalWorkerCount` in interface `ThreadingViewMBean`

    - #### getDeadLockedWorkers

          public String[] getDeadLockedWorkers()

      Specified by:
        `getDeadLockedWorkers` in interface `ThreadingViewMBean`

    - #### getAvgBlockedWorkerPercentage

          public double getAvgBlockedWorkerPercentage()

      Specified by:
        `getAvgBlockedWorkerPercentage` in interface `ThreadingViewMBean`

    - #### getAvgUnblockedWorkerPercentage

          public double getAvgUnblockedWorkerPercentage()

      Specified by:
        `getAvgUnblockedWorkerPercentage` in interface `ThreadingViewMBean`

    - #### getLastMinuteBlockedWorkerPercentage

          public double getLastMinuteBlockedWorkerPercentage()

      Specified by:
        `getLastMinuteBlockedWorkerPercentage` in interface `ThreadingViewMBean`

    - #### getLast5MinuteBlockedWorkerPercentage

          public double getLast5MinuteBlockedWorkerPercentage()

      Specified by:
        `getLast5MinuteBlockedWorkerPercentage` in interface `ThreadingViewMBean`

    - #### getLast15MinuteBlockedWorkerPercentage

          public double getLast15MinuteBlockedWorkerPercentage()

      Specified by:
        `getLast15MinuteBlockedWorkerPercentage` in interface `ThreadingViewMBean`

    - #### getLastHourBlockedWorkerPercentage

          public double getLastHourBlockedWorkerPercentage()

      Specified by:
        `getLastHourBlockedWorkerPercentage` in interface `ThreadingViewMBean`

    - #### getLast8HourBlockedWorkerPercentage

          public double getLast8HourBlockedWorkerPercentage()

      Specified by:
        `getLast8HourBlockedWorkerPercentage` in interface `ThreadingViewMBean`

    - #### getLast24HourBlockedWorkerPercentage

          public double getLast24HourBlockedWorkerPercentage()

      Specified by:
        `getLast24HourBlockedWorkerPercentage` in interface `ThreadingViewMBean`

    - #### getLastResetTime

          public Date getLastResetTime()

      Specified by:
        `getLastResetTime` in interface `ThreadingViewMBean`

    - #### reset

          public void reset()

      Specified by:
        `reset` in interface `ThreadingViewMBean`

Copyright © 2005–2023 Apache Software Foundation. All rights reserved.