Package tech.illuin.pipeline
Interface Pipeline<I>
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
CompositePipeline
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The Pipeline interface is both the top-level type for Pipeline implementations, and the entrypoint for the creation of pipeline builders via the
of(java.lang.String) methods.- Author:
- Pierre Lecerf ([email protected])
-
Method Summary
Modifier and TypeMethodDescriptionasStep()Returns aStepwrapping the execution of this Pipeline instance.default voidclose()default PipelineDescriptiondescribe()default Stringid()The returned identifier should ideally be unique throughout an application.default Contextdefault ContextnewContext(Output parent) static <I> SimplePipelineBuilder<I>Returns a newSimplePipelineBuilderinstance for assembling a Pipeline which abstracts away payload management.static <I> PayloadPipelineBuilder<I>of(String id, InitializerAssembler<I> initializer) static <I> PayloadPipelineBuilder<I>of(String id, Initializer<I> initializer) Returns a newPayloadPipelineBuilderinstance, this is the default type of pipeline with input and payload management.default Outputrun()Runs the Pipeline with a null input and an emptySimpleContext.default OutputRuns the Pipeline with an emptySimpleContext.default OutputRuns the Pipeline with aSimpleContextthat can be adjusted via the setup argument.The run method is the Pipeline's sole entrypoint, responsible for implementing its behaviour.
-
Method Details
-
id
The returned identifier should ideally be unique throughout an application. It is used in log entries and by thePipelineContaineras an identity and indexing key.- Returns:
- the Pipeline's identifier
-
run
The run method is the Pipeline's sole entrypoint, responsible for implementing its behaviour. It returns anOutputwhich is the composition ofResultinstances produced during the run itself, as well as eventual historicalResultretrieved from theContextat initialization.- Parameters:
input- an input value which can be directly processed byStepor can contribute to the initialization of a payloadcontext- an optionalContextinstance providing information related tu current and eventual previous runs- Returns:
- the Pipeline's output
- Throws:
PipelineException
-
run
Runs the Pipeline with aSimpleContextthat can be adjusted via the setup argument.- Throws:
PipelineException- See Also:
-
run
Runs the Pipeline with a null input and an emptySimpleContext.- Throws:
PipelineException- See Also:
-
run
Runs the Pipeline with an emptySimpleContext.- Throws:
PipelineException- See Also:
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
asStep
- See Also:
-
asStep
Returns aStepwrapping the execution of this Pipeline instance. The wrapper is responsible for managing context continuity, making it possible for the pipeline to access upstream results. -
of
Returns a newSimplePipelineBuilderinstance for assembling a Pipeline which abstracts away payload management.- Type Parameters:
I- the Pipeline's input type- Parameters:
id- the Pipeline's identifier- Returns:
- the builder instance
-
of
Returns a newPayloadPipelineBuilderinstance, this is the default type of pipeline with input and payload management.- Type Parameters:
I- the Pipeline's input type- Parameters:
id- the Pipeline's identifierinitializer- the Initializer responsible for creating the payload- Returns:
- the builder instance
- See Also:
-
of
- See Also:
-
newContext
-
newContext
-
describe
-