SplitNode
class SplitNode<InputT, MainOutputT, SideOutputT, ChannelT : ChannelType<ChannelT>>(label: String, source: InputChannel<InputT, ChannelT>, mainDestination: OutputChannel<MainOutputT, ChannelT>, sideDestination: PushOutputChannel<SideOutputT>, splitter: (InputT) -> Pair<MainOutputT, SideOutputT>) : PassthroughNode<InputT, MainOutputT, ChannelT> , Split<InputT, MainOutputT, SideOutputT>
Splits entities into two outputs: a main output and a side output. Each incoming entity is processed by the splitter function to produce both outputs. The node remains ready only when the side destination is open.
Parameters
InputT
the type of incoming entities
MainOutputT
the type of entities sent to the main output
SideOutputT
the type of entities sent to the side output
ChannelT
the channel type (Push or Pull)
label
the name of this node
source
the input channel from which entities are received
mainDestination
the output channel for main entities
sideDestination
the output channel for side entities
splitter
the function that splits an entity into main and side outputs
Constructors
Link copied to clipboard
constructor(label: String, source: InputChannel<InputT, ChannelT>, mainDestination: OutputChannel<MainOutputT, ChannelT>, sideDestination: PushOutputChannel<SideOutputT>, splitter: (InputT) -> Pair<MainOutputT, SideOutputT>)