class Pipeline[A, B] extends Closeable
Represents a pipeline of instructions used to perform a series of operations over an arbitrary collection of data.
- A
The incoming data type
- B
The outgoing data type
- Alphabetic
- By Inheritance
- Pipeline
- Closeable
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addChildPipeline[C](childPipeline: Pipeline[B, C]): Pipeline[B, C]
Adds the specified pipeline as a child of this pipeline.
Adds the specified pipeline as a child of this pipeline.
- C
The outgoing type of the child pipeline
- childPipeline
The pipeline to add as a child
- returns
The added child pipeline
- Attributes
- protected
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
children: Seq[Pipeline[B, _]]
Retrieves the collection of children pipelines for the current pipeline.
Retrieves the collection of children pipelines for the current pipeline.
- returns
The collection of pipelines that are children to this pipeline
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
close(): Unit
Closes the pipeline immediately.
Closes the pipeline immediately. No data is provided.
- Definition Classes
- Pipeline → Closeable → AutoCloseable
-
def
close(now: Boolean = true, data: Any = null): Unit
Closes the pipeline.
Closes the pipeline.
- now
If true, should perform the closing action immediately rather than on the next data fed through the pipeline
- data
Any data to be provided to the close function
-
def
currentMetadata: Metadata
Retrieves the current metadata at this stage in the pipeline.
Retrieves the current metadata at this stage in the pipeline.
- returns
The map of metadata
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
failed: Pipeline[Throwable, Throwable]
Retrieves the failure route of the current pipeline stage.
Retrieves the failure route of the current pipeline stage.
- returns
The pipeline to process the throwable from the failure
-
def
filter(f: (B) ⇒ Boolean): Pipeline[B, B]
Filters the output of this pipeline instance.
Filters the output of this pipeline instance.
- f
The function to use for filtering data (only true results will remain in output)
- returns
The resulting pipeline instance with the filtered data
-
def
filterNot(f: (B) ⇒ Boolean): Pipeline[B, B]
Filters the output of this pipeline instance.
Filters the output of this pipeline instance.
- f
The function to use for filtering data (only false results will remain in output)
- returns
The resulting pipeline instance with the filtered data
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flatMap[C](f: (B) ⇒ GenTraversableOnce[C]): Pipeline[B, C]
Maps the output of this pipeline instance to new values and then flattens the results.
Maps the output of this pipeline instance to new values and then flattens the results.
- C
The resulting type of the new values
- f
The function to use for mapping data to new values that will be flattened
- returns
The resulting pipeline instance with the mapped and flattened data
-
def
foreach(f: (B) ⇒ Unit): Unit
Applies the provided function to the output of this pipeline, returning nothing from the function.
Applies the provided function to the output of this pipeline, returning nothing from the function.
- f
The function to apply
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
map[C](f: (B) ⇒ C): Pipeline[B, C]
Maps the output of this pipeline instance to new values.
Maps the output of this pipeline instance to new values.
- C
The resulting type of the new values
- f
The function to use for mapping data to new values
- returns
The resulting pipeline instance with the mapped data
- Note
Inherits the close function of the pipeline.
-
def
metadata: Pipeline[B, (B, Metadata)]
Retrieves the metadata route of the current pipeline stage.
Retrieves the metadata route of the current pipeline stage.
- returns
The pipeline to process the metadata for the pipeline, containing the data and metadata as a tuple
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
newPipeline[C, D](operation: Operation[C, D]): Pipeline[C, D]
Creates a new pipeline using the given operation.
Creates a new pipeline using the given operation. This is used to generate pipelines within the pipeline itself and can be overridden to generate a different kind of pipeline. It is recommended to override this method when subclassing pipeline.
- C
The input type of the new pipeline
- D
The output type of the new pipeline
- operation
The operation to provide to the new pipeline
- returns
The new pipeline
- Attributes
- protected
- Note
This implementation passes down the current pipeline's close function and metadata map.
-
def
newPipeline[C, D](operation: Operation[C, D], closeFunc: CloseFunctionWithData, metadataMap: Metadata): Pipeline[C, D]
Creates a new pipeline using the given operation.
Creates a new pipeline using the given operation. This is used to generate pipelines within the pipeline itself and can be overridden to generate a different kind of pipeline. It is recommended to override this method when subclassing pipeline.
- C
The input type of the new pipeline
- D
The output type of the new pipeline
- operation
The operation to provide to the new pipeline
- closeFunc
The function used to close the new pipeline
- metadataMap
The map of metadata to hold in the pipeline instance
- returns
The new pipeline
- Attributes
- protected
-
def
noop(): Pipeline[B, B]
Applies a no-op on the current pipeline.
Applies a no-op on the current pipeline.
- returns
The pipeline after a no-op has been applied
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- val operation: Operation[A, B]
-
def
process(data: A*): Try[Seq[B]]
Processes the provided data through this specific pipeline instance and all subsequent children of this pipeline instance.
Processes the provided data through this specific pipeline instance and all subsequent children of this pipeline instance. No parent pipeline instance will be used during the processing of the data.
- data
The data to process
- returns
If successful, the transformed collection of data at this specific pipeline instance, otherwise the thrown exception
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toFuture: Future[B]
Transforms the pipeline into a future that will be evaluated once and then closes the underlying pipeline.
Transforms the pipeline into a future that will be evaluated once and then closes the underlying pipeline.
- returns
The future representing this pipeline
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
transform[C](operation: Operation[B, C]): Pipeline[B, C]
Transforms the output of this pipeline using the provided operation.
Transforms the output of this pipeline using the provided operation.
- C
The resulting type of the output from the operation
- operation
The operation to use to transform the output of this pipeline instance
- returns
The resulting pipeline instance from applying the operation
- Note
Inherits the close function of the pipeline.
-
def
unionInput(other: Pipeline[A, _]): Pipeline[A, A]
Unions this pipeline with another pipeline that has the same input such that input from either pipeline is used for both.
Unions this pipeline with another pipeline that has the same input such that input from either pipeline is used for both.
- other
The other pipeline whose input to union together
- returns
The unioned pipeline
-
def
unionOutput(other: Pipeline[_, B]): Pipeline[B, B]
Unions this pipeline with another pipeline that has the same output such that output from either pipeline flows through the union.
Unions this pipeline with another pipeline that has the same output such that output from either pipeline flows through the union.
- other
The other pipeline to whose output to union together
- returns
The unioned pipeline
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
withMetadata(metadataMap: Metadata): Pipeline[B, B]
Adds additional metadata by creating a new stage in the pipeline with the additional metadata merged with the existing metadata.
Adds additional metadata by creating a new stage in the pipeline with the additional metadata merged with the existing metadata.
- metadataMap
The new metadata to add to future pipeline stages
- returns
The resulting pipeline instance with the updated metadata