This is automatically generated documentation. Edit after the "COMMENTS" heading; changes to the main body will be lost.

Queue Element Documentation

NAME

Queue -- Click element; stores packets in a FIFO queue

SYNOPSIS

Queue
Queue(CAPACITY)

Ports: 1 input, 1-2 outputs
Package: standard (core)

DESCRIPTION

Stores incoming packets in a first-in-first-out queue. Drops incoming packets if the queue already holds CAPACITY packets. The default for CAPACITY is 1000. Queue 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 behavior is the same as that of NotifierQueue. (See QuickNoteQueue for an alternative.) Queue additionally notifies interested parties that it is non-full, and when a formerly-full queue gains some free space. In all respects but notification, Queue behaves exactly like SimpleQueue. You may also use the old element name "FullNoteQueue". Multithreaded Click note: Queue is designed to be used in an environment with at most one concurrent pusher and at most one concurrent puller. Thus, at most one thread pushes to the Queue at a time and at most one thread pulls from the Queue at a time. Different threads can push to and pull from the Queue concurrently, however. See ThreadSafeQueue for a queue that can support multiple concurrent pushers and pullers.

ELEMENT HANDLERS

length (read-only)
Returns the current number of packets in the queue.
highwater_length (read-only)
Returns the maximum number of packets that have ever been in the queue at once.
capacity (read/write)
Returns or sets the queue's capacity.
drops (read-only)
Returns the number of packets dropped by the queue so far.
reset_counts (write-only)
When written, resets the drops and highwater_length counters.
reset (write-only)
When written, drops all packets in the queue.

SEE ALSO

ThreadSafeQueue, QuickNoteQueue, SimpleQueue, NotifierQueue, MixedQueue, FrontDropQueue

Generated by 'click-elem2man' from '../elements/standard/fullnotequeue.hh' on 28/Feb/2010.

COMMENTS

 
elements/queue.txt · Last modified: 2010/02/28 13:58 (external edit)
 
Recent changes RSS feed Driven by DokuWiki