Barrier

class Barrier(val inType: KClass<out StageResult>, val outType: KClass<out StageResult>, val ioTransform: (StageResult) -> StageResult) : PipelineStage

Pipeline stage which acts as a barrier to prevent adjacent stages from reordering beyond this point.

Parameters

ioTransform

Method to transform an instance of inType to outType. It is safe to assume that the input is an instance of inType.

Constructors

Link copied to clipboard
constructor(inType: KClass<out StageResult>, outType: KClass<out StageResult>, ioTransform: (StageResult) -> StageResult)

Properties

Link copied to clipboard
protected lateinit var _runner: Runner
Link copied to clipboard
open val className: String

The class name of this pipeline stage.

Link copied to clipboard

The configuration used to instantiate this stage.

Link copied to clipboard

The key of the configuration which instantiated this stage.

Link copied to clipboard
protected var hasTimedOut: Boolean

Whether this stage has timed out.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected val logger: Logger
Link copied to clipboard
Link copied to clipboard

The context of the configuration parser associated with instantiating this stage.

Link copied to clipboard

The unique stage name of this pipeline stage.

Link copied to clipboard
open val runner: Runner

Functions

Link copied to clipboard
protected open suspend override fun execute(input: StageResult): StageResult

Implementation for executing this pipeline.

Link copied to clipboard

Executes this pipeline stage using input.

Link copied to clipboard
protected fun markStageAsTimedOut()

Marks this stage as having timed out.

Link copied to clipboard
@MustBeInvokedByOverriders
protected open suspend fun onExecComplete()

Callback method to run when execute method completes, regardless of whether it succeeds or fails.

Link copied to clipboard
protected fun onExecFailed(tr: Throwable)

Callback method to run when the execute method fails.

Link copied to clipboard
protected open override fun onExecFailedImpl(tr: Throwable)

Implementation for when the execute method fails.

Link copied to clipboard
protected open fun onInitParserContext(configContext: ConfigParsable.Context)

Implementation when parser context is provided to the stage.

Link copied to clipboard

Provides the parser context to this pipeline stage.

Link copied to clipboard
fun putRunner(runner: Runner)

Puts the context of the Runner into this pipeline stage.