Package com.lumiomedical.flow
Class Source<O>
- All Implemented Interfaces:
FlowOut<O>
,Node
,Comparable<Node>
public class Source<O> extends SimpleNode<Extractor<O>> implements FlowOut<O>
Sources represent an entrypoint node in a DAG.
They have no upstream but can propagate their output downstream.
- Author:
- Pierre Lecerf ([email protected]) Created on 2020/02/28
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Recipient<O>
collect(String name)
Source<O>
drift(Loader<O> loader)
List<Node>
getUpstream()
Returns the list of upstream nodes, ie. nodes which output is required in order to execute the current node.Sink<O>
into(Loader<O> loader)
Binds the current node into a Loader, resulting in a new Sink node.<N> Pipe<O,N>
into(Transformer<O,N> transformer)
Binds the current node into a Transformer, resulting in a new Pipe node.<JI, JO> Join<O,JI,JO>
join(FlowOut<JI> input, BiTransformer<O,JI,JO> transformer)
Joins the current node with another flow using a bi-transformer join function.Source<O>
sample(String name)
<N> StreamGenerator<O,N>
stream(Function<O,Generator<N>> generatorSupplier)
Initiates a stream from the current node, results in a new StreamGenerator node.Methods inherited from class com.lumiomedical.flow.node.SimpleNode
bind, getActor, getSimpleUpstream
Methods inherited from class com.lumiomedical.flow.node.AbstractNode
after, after, equals, getDownstream, getRequiredBy, getRequirements, getUid, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.lumiomedical.flow.node.Node
after, after, compareTo, getDownstream, getRequiredBy, getRequirements, getUid
-
Constructor Details
-
Source
- Parameters:
actor
-
-
-
Method Details
-
into
Description copied from interface:FlowOut
Binds the current node into a Transformer, resulting in a new Pipe node. -
into
Description copied from interface:FlowOut
Binds the current node into a Loader, resulting in a new Sink node. -
join
Description copied from interface:FlowOut
Joins the current node with another flow using a bi-transformer join function. -
stream
Description copied from interface:FlowOut
Initiates a stream from the current node, results in a new StreamGenerator node. -
drift
- Parameters:
loader
-- Returns:
-
collect
-
sample
- Parameters:
name
-- Returns:
-
getUpstream
Description copied from interface:Node
Returns the list of upstream nodes, ie. nodes which output is required in order to execute the current node. For Source nodes, this should be empty. For Pipe and Sink nodes, this should be a list of size 1. For Join nodes, this should be a list of size 2.- Specified by:
getUpstream
in interfaceNode
- Overrides:
getUpstream
in classSimpleNode<Extractor<O>>
- Returns:
- the list of upstream nodes
-