thenBoundedQueue
fun <T> NodeBuilder<T, *>.thenBoundedQueue(label: String, capacity: Int, policy: QueuePolicy<T> = FIFOQueuePolicy()): RegularNodeBuilder<BoundedQueueNode<T>, T, ChannelType.Pull>
Attaches a buffered queue (of limited max capacity) into the builder chain, which can then be continued after this call. If a bounded queue reaches maximum capacity, the node will not accept anymore pushes, or will not pull from the upstream node, until something has left the bounded queue
Simulates a holding area / buffer, which when used with other nodes can construct:
within a bounded subnetwork -> parking lot to store port vehicles while not in use
combined with a fork node -> buffers or queues of vehicles waiting to pass through a gate or to be dispatched to a service node
Parameters
capacity
Maximum capacity of the bounded queue instance.
policy
Controls the behaviour of the queue, i.e., prioritising certain vehicles to exit the queue before others.