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. For convenience reasons QueuingEntity has four static methods to create commonly used queuing types, namely bounded/unbounded FIFO (first in first out) and bounded/unbounded LIFO (last in first out). These static methods return a QueuingEntity and directly set the appropriate QueuingDiscipline.
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.