This is automatically generated documentation. Edit after the "COMMENTS" heading; changes to the main body will be lost.
MixedQueue -- Click element; stores packets in a FIFO/LIFO queue
MixedQueue
MixedQueue(CAPACITY)
Ports: 2 inputs, 1-2 outputs
Package: standard (core)
Stores incoming packets in a mixed first-in-first-out/last-in-first-out queue. In particular, MixedQueue's first input is FIFO, but its second input is LIFO. The queue is full when it holds CAPACITY packets. When full, MixedQueue drops incoming FIFO packets, but drops the oldest packet to make room for incoming LIFO packets. The default for CAPACITY is 1000. MixedQueue notifies interested parties when it becomes empty and when a formerly-empty queue receives a packet. The empty notification takes place some time after the queue goes empty, to prevent thrashing for queues that hover around 1 or 2 packets long.
This diagram shows the state of a MixedQueue after 5 pushes, of packets A through E. The queue's head is on the left.
initial state empty
push(0, A) [A]
push(0, B) [A B]
push(1, C) [C A B]
push(0, D) [C A B D]
push(1, E) [E C A B D]
Note for multithreaded Click: Unlike Queue, whose input and output ports need not be synchronized, MixedQueue requires synchronization between its LIFO input and its output. You will need to prevent a thread from pushing to the LIFO input at the same time that a different thread pulls from the output.
drops and highwater_length counters.Queue, SimpleQueue, FrontDropQueue
Generated by 'click-elem2man' from '../elements/standard/mixedqueue.hh' on 7/Mar/2009.