BoundedQueueNode
class BoundedQueueNode<T>(label: String, source: PushInputChannel<T>, destination: PullOutputChannel<T>, val capacity: Int, policy: QueuePolicy<T> = FIFOQueuePolicy()) : ContainerNode<T> , Queue<T> , BoundedContainer<T>
A queue with a maximum capacity. Receives entities through a push channel and outputs through a pull channel.
When the queue reaches capacity, the input channel closes to prevent further arrivals.
Uses the provided QueuePolicy to order entities (defaults to FIFO).
Parameters
T
the type of entities in the queue
label
the name of this node
source
the input channel from which entities are received
destination
the output channel where entities are sent
capacity
the maximum number of entities the queue can hold
policy
the QueuePolicy that determines entity ordering (defaults to FIFO)
Constructors
Link copied to clipboard
constructor(label: String, source: PushInputChannel<T>, destination: PullOutputChannel<T>, capacity: Int, policy: QueuePolicy<T> = FIFOQueuePolicy())
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Checks if the QueuePolicy supports residence time tracking.