AmountRequest

inner class AmountRequest(receiver: ProcessModel.Entity, predicate: (T) -> Boolean, val amountRequested: Int, priority: Int) : BlockingQueue.ChannelRequest<T> (source)

Represents a request by an entity to receive a given amount of items from the channel that meet the criteria (predicate).

Parameters

receiver

the entity that wants the items

predicate

the criteria for selecting the items from the channel

amountRequested

the number of items (meeting the criteria) that are needed

Constructors

Link copied to clipboard
constructor(receiver: ProcessModel.Entity, predicate: (T) -> Boolean, amountRequested: Int, priority: Int)

Properties

Link copied to clipboard
Link copied to clipboard
open override val canBeFilled: Boolean

True if the request can be filled at the time the property is accessed