org.jboss.jca.core.workmanager

## Class StatisticsExecutorImpl

- java.lang.Object
- - org.jboss.jca.core.workmanager.StatisticsExecutorImpl

- All Implemented Interfaces:
    java.util.concurrent.Executor, org.jboss.jca.core.api.workmanager.StatisticsExecutor, org.jboss.threads.BlockingExecutor

      public class StatisticsExecutorImpl
      extends java.lang.Object
      implements org.jboss.jca.core.api.workmanager.StatisticsExecutor

  A StatisticsExecutor implementation keeping track of numberOfFreeThreads
  Author:
    Stefano Maestri

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StatisticsExecutorImpl(org.jboss.threads.BlockingExecutor realExecutor)` StatisticsExecutorImpl constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `execute(java.lang.Runnable runnable)`
    `void` | `executeBlocking(java.lang.Runnable runnable)`
    `void` | `executeBlocking(java.lang.Runnable runnable, long l, java.util.concurrent.TimeUnit timeUnit)`
    `void` | `executeNonBlocking(java.lang.Runnable runnable)`
    `long` | `getNumberOfFreeThreads()` get the calculated number of free threads

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

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

- - ### Constructor Detail

    - #### StatisticsExecutorImpl

          public StatisticsExecutorImpl(org.jboss.threads.BlockingExecutor realExecutor)

      StatisticsExecutorImpl constructor
      Parameters:
        `realExecutor` - the real executor we are delegating

  - ### Method Detail

    - #### execute

          public void execute(java.lang.Runnable runnable)

      Specified by:
        `execute` in interface `java.util.concurrent.Executor`
      Specified by:
        `execute` in interface `org.jboss.threads.BlockingExecutor`

    - #### executeBlocking

          public void executeBlocking(java.lang.Runnable runnable)
                               throws java.util.concurrent.RejectedExecutionException,
                                      java.lang.InterruptedException

      Specified by:
        `executeBlocking` in interface `org.jboss.threads.BlockingExecutor`
      Throws:
        `java.util.concurrent.RejectedExecutionException`
        `java.lang.InterruptedException`

    - #### executeBlocking

          public void executeBlocking(java.lang.Runnable runnable,
                                      long l,
                                      java.util.concurrent.TimeUnit timeUnit)
                               throws java.util.concurrent.RejectedExecutionException,
                                      java.lang.InterruptedException

      Specified by:
        `executeBlocking` in interface `org.jboss.threads.BlockingExecutor`
      Throws:
        `java.util.concurrent.RejectedExecutionException`
        `java.lang.InterruptedException`

    - #### executeNonBlocking

          public void executeNonBlocking(java.lang.Runnable runnable)
                                  throws java.util.concurrent.RejectedExecutionException

      Specified by:
        `executeNonBlocking` in interface `org.jboss.threads.BlockingExecutor`
      Throws:
        `java.util.concurrent.RejectedExecutionException`

    - #### getNumberOfFreeThreads

          public long getNumberOfFreeThreads()

      Description copied from interface: `org.jboss.jca.core.api.workmanager.StatisticsExecutor`
      get the calculated number of free threads
      Specified by:
        `getNumberOfFreeThreads` in interface `org.jboss.jca.core.api.workmanager.StatisticsExecutor`
      Returns:
        number of free threads

Copyright © 2014 IronJacamar (http://www.ironjacamar.org)