Package ikr.simlib.entities.queues

Queues

See: Description

Package ikr.simlib.entities.queues Description

Queues

Queues that are based on the base class QueuingEntity which is derived from Entity can store any kind of message. QueuingEntity has four special derivatives, namely BoundedFIFOQueue, UnboundedFIFOQueue, BoundedLIFOQueue and UnboundedLIFOQueue. The first two represent a FIFO queues (First In First Out), whereas the latter two represents a LIFO queue (Last In First Out).
The lengths of a queue is measured in units (information units, e. g. bytes). A unit corresponds to the length specified in the member length of Message and is also the basis to determine whether a bounded queue is full. Nevertheless, the length of a queue in number of packets is also remembered by List<> in which the messages are stored. The different kinds of lengths can be retrieved by queue.getQDisc().getCurrentNumberOfUnits() and queue.getQDisc().getCurrentNumberOfMessages(), respectively.