Class LimitedPipelineExecutor<O>

  • Type Parameters:
    O - The type of object for which work is registered and which identifies a pipeline.
    All Implemented Interfaces:
    Executor, ExecutorService

    @Deprecated
    public class LimitedPipelineExecutor<O>
    extends AbstractPipeliningExecutor<O,​Integer>
    Deprecated.
    A pipeline executor that has an upper limit for the amount of pipelines. Several different objects will be executed by the same pipeline.
    Author:
    Ulrich Kreher
    • Field Detail

      • limit

        protected final int limit
        Deprecated.
        The maximum amount of pipelines.
    • Constructor Detail

      • LimitedPipelineExecutor

        public LimitedPipelineExecutor​(int limit,
                                       Adept2ThreadFactory threadFactory)
        Deprecated.
        Creates a new thread pool executor with the designated amount of pipelines and threads. The threads will stay idle for 60 seconds before they terminate.
        Parameters:
        limit - The maximum number of threads allowed in the pool and also the maximum number of pipelines.
        threadFactory - The factory to use when the executor creates a new thread.
    • Method Detail

      • getPipelineFor

        protected Integer getPipelineFor​(O object)
        Deprecated.
        Gets the identifier determining the pipeline for the designated object accordingly to the limit of the number of pipelines. Returns the hashcode of the designated object modulo the limit.
        Specified by:
        getPipelineFor in class AbstractPipeliningExecutor<O,​Integer>
        Parameters:
        object - The object for which to determine the pipeline.
        Returns:
        The identifier determining the pipeline for the designated object.