PushForkNode

class PushForkNode<T>(label: String, source: PushInputChannel<T>, destinations: List<PushOutputChannel<T>>, policy: ForkPolicy<T> = forkPolicy(RandomPolicy())) : Node

Routes incoming entities to one of multiple output destinations based on a ForkPolicy. Each entity is sent to a single chosen destination. The input remains open only if at least one output destination is open.

Parameters

T

the type of entities being routed

label

the name of this node

source

the input channel from which entities are received

destinations

the list of output channels to route entities to

policy

the ForkPolicy that determines which destination receives each entity (defaults to random)

Constructors

Link copied to clipboard
constructor(label: String, source: PushInputChannel<T>, destinations: List<PushOutputChannel<T>>, policy: ForkPolicy<T> = forkPolicy(RandomPolicy()))

Properties

Link copied to clipboard
override val incoming: List<InputChannel<*, *>>
Link copied to clipboard
Link copied to clipboard
override val outgoing: List<OutputChannel<*, *>>
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
context(_: Simulator)
open override fun onStart()

Initializes the policy

Link copied to clipboard
Link copied to clipboard
open override fun toString(): String