Class PipelineRunnable<P>

  • Type Parameters:
    P - The type of objects that identify a pipeline.
    All Implemented Interfaces:
    Runnable

    @Deprecated
    public class PipelineRunnable<P>
    extends Object
    implements Runnable
    Deprecated.
    Use PipelineRunnable instead.
    A runnable that executes all runnables that are present for a specific object. Think of this runnable as pipeline that executes all work that arrives in the pipeline. As soon as there is no more work, the pipeline (represented by a queue) will be deleted.
    Author:
    Ulrich Kreher
    • Field Detail

      • pipelineId

        protected final P pipelineId
        Deprecated.
        The identifier of our pipeline.
      • pipeline

        protected final Queue<Runnable> pipeline
        Deprecated.
        The pipeline providing the work for this runnable.
      • pipelines

        protected final Map<P,​Pair<PipelineRunnable<P>,​Queue<Runnable>>> pipelines
        Deprecated.
        The data structures containing all pipelines from which the current pipeline will be removed as soon as it is empty.
      • terminate

        protected final AtomicInteger terminate
        Deprecated.
        A boolean flag to signal this pipeline to terminate. This allows for synchronising across different pipelines.
      • active

        protected volatile boolean active
        Deprecated.
        A flag to indicate that this pipeline is active.
      • terminated

        protected final CountDownLatch terminated
        Deprecated.
        The latch allowing others to wait for the termination of this pipeline.
      • logger

        protected final Logger logger
        Deprecated.
        The logger which to use for runtime exceptions stemming from executing a runnable. Such an exception will only be logged, the execution of the pipeline will continue.
    • Constructor Detail

      • PipelineRunnable

        protected PipelineRunnable​(P pipelineId,
                                   Queue<Runnable> pipeline,
                                   Map<P,​Pair<PipelineRunnable<P>,​Queue<Runnable>>> pipelines,
                                   AtomicInteger terminate,
                                   Logger logger)
        Deprecated.
        Creates a new runnable that executes all the work present for a specific object (in a pipeline).
        Parameters:
        pipelineId - The identifier of our pipeline.
        pipeline - The pipeline providing the work for this runnable.
        pipelines - The data structures containing all pipelines from which the current pipeline will be removed as soon as it is empty.
        terminate - A boolean flag to signal this thread to terminate. This allows for synchronising across different pipelines.
        logger - The logger which to use for runtime exceptions stemming from a executing a runnable. Such an exception will only be logged, the execution of the pipeline will continue.
    • Method Detail

      • getId

        public P getId()
        Deprecated.
        Gets the ID of this pipeline.
        Returns:
        The ID of this pipeline.
      • run

        public void run()
        Deprecated.
        Specified by:
        run in interface Runnable
      • awaitTermination

        public void awaitTermination()
                              throws InterruptedException
        Deprecated.
        Awaits the termination of this runnable. Either the thread has been interrupted, its termination has been requested or the pipeline is empty.
        Throws:
        InterruptedException - If the waiting thread is interrupted while waiting for this runnable to terminate, an InterruptedException will be thrown.