org.apache.mina.filter.executor

## Class UnorderedThreadPoolExecutor

- java.lang.Object
- - java.util.concurrent.AbstractExecutorService
  - - java.util.concurrent.ThreadPoolExecutor
    - - org.apache.mina.filter.executor.UnorderedThreadPoolExecutor

- All Implemented Interfaces:
    Executor, ExecutorService

      public class UnorderedThreadPoolExecutor
      extends ThreadPoolExecutor

  A `ThreadPoolExecutor` that does not maintain the order of `IoEvent`s. This means more than one event handler methods can be invoked at the same time with mixed order. For example, let's assume that messageReceived, messageSent, and sessionClosed events are fired.
  - All event handler methods can be called simultaneously. (e.g. messageReceived and messageSent can be invoked at the same time.)
  - The event order can be mixed up. (e.g. sessionClosed or messageSent can be invoked before messageReceived is invoked.)
  If you need to maintain the order of events per session, please use `OrderedThreadPoolExecutor`.
  Author:
    Apache MINA Project

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor

      `ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UnorderedThreadPoolExecutor()`
    `UnorderedThreadPoolExecutor(int maximumPoolSize)`
    `UnorderedThreadPoolExecutor(int corePoolSize, int maximumPoolSize)`
    `UnorderedThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit)`
    `UnorderedThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, IoEventQueueHandler queueHandler)`
    `UnorderedThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, ThreadFactory threadFactory)`
    `UnorderedThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, ThreadFactory threadFactory, IoEventQueueHandler queueHandler)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `awaitTermination(long timeout, TimeUnit unit)`
    `void` | `execute(Runnable task)`
    `int` | `getActiveCount()`
    `long` | `getCompletedTaskCount()`
    `int` | `getCorePoolSize()`
    `int` | `getLargestPoolSize()`
    `int` | `getMaximumPoolSize()`
    `int` | `getPoolSize()`
    `IoEventQueueHandler` | `getQueueHandler()`
    `long` | `getTaskCount()`
    `boolean` | `isShutdown()`
    `boolean` | `isTerminated()`
    `boolean` | `isTerminating()`
    `int` | `prestartAllCoreThreads()`
    `boolean` | `prestartCoreThread()`
    `void` | `purge()`
    `boolean` | `remove(Runnable task)`
    `void` | `setCorePoolSize(int corePoolSize)`
    `void` | `setMaximumPoolSize(int maximumPoolSize)`
    `void` | `setRejectedExecutionHandler(RejectedExecutionHandler handler)`
    `void` | `shutdown()`
    `List<Runnable>` | `shutdownNow()`

    - ### Methods inherited from class java.util.concurrent.ThreadPoolExecutor

      `afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, beforeExecute, finalize, getKeepAliveTime, getQueue, getRejectedExecutionHandler, getThreadFactory, setKeepAliveTime, setThreadFactory, terminated, toString`

    - ### Methods inherited from class java.util.concurrent.AbstractExecutorService

      `invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit`

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

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

- - ### Constructor Detail

    - #### UnorderedThreadPoolExecutor

          public UnorderedThreadPoolExecutor()

    - #### UnorderedThreadPoolExecutor

          public UnorderedThreadPoolExecutor(int maximumPoolSize)

    - #### UnorderedThreadPoolExecutor

          public UnorderedThreadPoolExecutor(int corePoolSize,
                                     int maximumPoolSize)

    - #### UnorderedThreadPoolExecutor

          public UnorderedThreadPoolExecutor(int corePoolSize,
                                     int maximumPoolSize,
                                     long keepAliveTime,
                                     TimeUnit unit)

    - #### UnorderedThreadPoolExecutor

          public UnorderedThreadPoolExecutor(int corePoolSize,
                                     int maximumPoolSize,
                                     long keepAliveTime,
                                     TimeUnit unit,
                                     IoEventQueueHandler queueHandler)

    - #### UnorderedThreadPoolExecutor

          public UnorderedThreadPoolExecutor(int corePoolSize,
                                     int maximumPoolSize,
                                     long keepAliveTime,
                                     TimeUnit unit,
                                     ThreadFactory threadFactory)

    - #### UnorderedThreadPoolExecutor

          public UnorderedThreadPoolExecutor(int corePoolSize,
                                     int maximumPoolSize,
                                     long keepAliveTime,
                                     TimeUnit unit,
                                     ThreadFactory threadFactory,
                                     IoEventQueueHandler queueHandler)

  - ### Method Detail

    - #### getQueueHandler

          public IoEventQueueHandler getQueueHandler()

    - #### setRejectedExecutionHandler

          public void setRejectedExecutionHandler(RejectedExecutionHandler handler)

      Overrides:
        `setRejectedExecutionHandler` in class `ThreadPoolExecutor`

    - #### getMaximumPoolSize

          public int getMaximumPoolSize()

      Overrides:
        `getMaximumPoolSize` in class `ThreadPoolExecutor`

    - #### setMaximumPoolSize

          public void setMaximumPoolSize(int maximumPoolSize)

      Overrides:
        `setMaximumPoolSize` in class `ThreadPoolExecutor`

    - #### awaitTermination

          public boolean awaitTermination(long timeout,
                                 TimeUnit unit)
                                   throws InterruptedException

      Specified by:
        `awaitTermination` in interface `ExecutorService`
      Overrides:
        `awaitTermination` in class `ThreadPoolExecutor`
      Throws:
        `InterruptedException`

    - #### isShutdown

          public boolean isShutdown()

      Specified by:
        `isShutdown` in interface `ExecutorService`
      Overrides:
        `isShutdown` in class `ThreadPoolExecutor`

    - #### isTerminated

          public boolean isTerminated()

      Specified by:
        `isTerminated` in interface `ExecutorService`
      Overrides:
        `isTerminated` in class `ThreadPoolExecutor`

    - #### shutdown

          public void shutdown()

      Specified by:
        `shutdown` in interface `ExecutorService`
      Overrides:
        `shutdown` in class `ThreadPoolExecutor`

    - #### shutdownNow

          public List<Runnable> shutdownNow()

      Specified by:
        `shutdownNow` in interface `ExecutorService`
      Overrides:
        `shutdownNow` in class `ThreadPoolExecutor`

    - #### execute

          public void execute(Runnable task)

      Specified by:
        `execute` in interface `Executor`
      Overrides:
        `execute` in class `ThreadPoolExecutor`

    - #### getActiveCount

          public int getActiveCount()

      Overrides:
        `getActiveCount` in class `ThreadPoolExecutor`

    - #### getCompletedTaskCount

          public long getCompletedTaskCount()

      Overrides:
        `getCompletedTaskCount` in class `ThreadPoolExecutor`

    - #### getLargestPoolSize

          public int getLargestPoolSize()

      Overrides:
        `getLargestPoolSize` in class `ThreadPoolExecutor`

    - #### getPoolSize

          public int getPoolSize()

      Overrides:
        `getPoolSize` in class `ThreadPoolExecutor`

    - #### getTaskCount

          public long getTaskCount()

      Overrides:
        `getTaskCount` in class `ThreadPoolExecutor`

    - #### isTerminating

          public boolean isTerminating()

      Overrides:
        `isTerminating` in class `ThreadPoolExecutor`

    - #### prestartAllCoreThreads

          public int prestartAllCoreThreads()

      Overrides:
        `prestartAllCoreThreads` in class `ThreadPoolExecutor`

    - #### prestartCoreThread

          public boolean prestartCoreThread()

      Overrides:
        `prestartCoreThread` in class `ThreadPoolExecutor`

    - #### purge

          public void purge()

      Overrides:
        `purge` in class `ThreadPoolExecutor`

    - #### remove

          public boolean remove(Runnable task)

      Overrides:
        `remove` in class `ThreadPoolExecutor`

    - #### getCorePoolSize

          public int getCorePoolSize()

      Overrides:
        `getCorePoolSize` in class `ThreadPoolExecutor`

    - #### setCorePoolSize

          public void setCorePoolSize(int corePoolSize)

      Overrides:
        `setCorePoolSize` in class `ThreadPoolExecutor`

Copyright © 2004-2012 Apache MINA Project. All Rights Reserved.