Class CompositePipeline<I>

java.lang.Object
tech.illuin.pipeline.CompositePipeline<I>
All Implemented Interfaces:
AutoCloseable, Pipeline<I>

public final class CompositePipeline<I> extends Object implements Pipeline<I>

The CompositePipeline works by separating its run implementation into predefined categories of components:

  • 1 Initializer responsible for creating the pipeline payload, which is reference in the Output and made available to steps and sinks
  • 1 to n Indexer responsible for identifying parts (or all) of the payload that will be subjected to steps
  • 0 to n Step performing transformative operations, ideally without external side effects, their output is indexed in the ResultContainer
  • 0 to n Sink performing terminal operations, expected to be external side effects, they can be executed in a synchronous or asynchronous fashion
  • 0 to 1 PipelineErrorHandler responsible for handling and possibly recovering from exceptions occurring during the pipeline's execution
  • 0 to n OnCloseHandler responsible for cleaning up when tearing down the pipeline

The pipeline references an ExecutorService which the pipeline will attempt to close when its own close() method is called.

It will additionally handle a variety of MeterRegistry counters reflecting the activity of its components.

Author:
Pierre Lecerf ([email protected])