Class UnlimitedPipelineExecutor<O>

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

    public class UnlimitedPipelineExecutor<O>
    extends AbstractPipeliningExecutor<O,​O>
    A pipeline executor that has a separate pipeline for each registered object and therefore also no upper limit concerning the amount of pipelines as well as the amount of threads.
    • Constructor Detail

      • UnlimitedPipelineExecutor

        @Deprecated(since="14.4.0",
                    forRemoval=true)
        public UnlimitedPipelineExecutor​(Adept2ThreadFactory threadFactory)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates a new thread pool executor with one pipeline per registered object and no limit for the threads. The threads will stay idle for 60 seconds before they terminate.
        Parameters:
        threadFactory - The factory to use when the executor creates a new thread.
      • UnlimitedPipelineExecutor

        public UnlimitedPipelineExecutor​(int maxPoolSize,
                                         Adept2ThreadFactory threadFactory)
        Creates a new thread pool executor with one pipeline per registered object and the designated maximum amount of threads. The threads will stay idle for 60 seconds before they terminate.
        Parameters:
        maxPoolSize - The maximum number of threads allowed in the pool. Set this to a sensible value (< Integer.MAX_VALUE).
        threadFactory - The factory to use when the executor creates a new thread.
    • Method Detail

      • getIndexObjectFor

        protected O getIndexObjectFor​(O object)
        Description copied from class: AbstractObjectSpecificExecutor
        Gets the object used for managing and executing runnables within this executor.
        Specified by:
        getIndexObjectFor in class AbstractObjectSpecificExecutor<O,​O,​Queue<Runnable>>
        Parameters:
        object - The object for which a runnable is registered.
        Returns:
        The object used for managing and executing runnables (registered for the designated object) within this executor.