Class OrderedDownstreamThreadPoolExecutor

  • All Implemented Interfaces:
    java.util.concurrent.Executor, java.util.concurrent.ExecutorService

    public final class OrderedDownstreamThreadPoolExecutor
    extends OrderedMemoryAwareThreadPoolExecutor
    Executor which should be used for downstream ChannelEvent's. This implementation will take care of preserve the order of the events in a Channel. If you don't need to preserve the order just use one of the Executor implementations provided by the static methods of Executors.

    For more informations about how the order is preserved see OrderedMemoryAwareThreadPoolExecutor
    • Constructor Detail

      • OrderedDownstreamThreadPoolExecutor

        public OrderedDownstreamThreadPoolExecutor​(int corePoolSize)
        Creates a new instance.
        Parameters:
        corePoolSize - the maximum number of active threads
      • OrderedDownstreamThreadPoolExecutor

        public OrderedDownstreamThreadPoolExecutor​(int corePoolSize,
                                                   long keepAliveTime,
                                                   java.util.concurrent.TimeUnit unit)
        Creates a new instance.
        Parameters:
        corePoolSize - the maximum number of active threads
        keepAliveTime - the amount of time for an inactive thread to shut itself down
        unit - the TimeUnit of keepAliveTime
      • OrderedDownstreamThreadPoolExecutor

        public OrderedDownstreamThreadPoolExecutor​(int corePoolSize,
                                                   long keepAliveTime,
                                                   java.util.concurrent.TimeUnit unit,
                                                   java.util.concurrent.ThreadFactory threadFactory)
        Creates a new instance.
        Parameters:
        corePoolSize - the maximum number of active threads
        keepAliveTime - the amount of time for an inactive thread to shut itself down
        unit - the TimeUnit of keepAliveTime
        threadFactory - the ThreadFactory of this pool