|
reSIProcate
SIP stack, Dialog Usage Manager and related libraries
|
A templated, threadsafe message-queue class. More...
#include <Fifo.hxx>
Public Types | |
| typedef AbstractFifo< Msg * >::Messages | Messages |
Public Member Functions | |
| Fifo (AsyncProcessHandler *interruptor=0) | |
| virtual | ~Fifo () |
| size_t | add (Msg *msg) |
| Add a message to the fifo. | |
| size_t | addMultiple (Messages &msgs) |
| Msg * | getNext () |
| Returns the first message available. | |
| Msg * | getNext (int ms) |
| Returns the next message available. | |
| void | getMultiple (Messages &other, unsigned int max) |
| bool | getMultiple (int ms, Messages &other, unsigned int max) |
| virtual void | clear () |
| delete all elements in the queue | |
| void | setInterruptor (AsyncProcessHandler *interruptor) |
Public Member Functions inherited from resip::AbstractFifo< Msg * > | |
| AbstractFifo () | |
| Constructor. | |
| virtual | ~AbstractFifo () |
| bool | empty () const |
| is the queue empty? | |
| virtual unsigned int | size () const |
| get the current size of the fifo. | |
| bool | messageAvailable () const |
| is a message available? | |
| virtual time_t | getTimeDepth () const |
| computes the time delta between the oldest and newest queue members | |
| virtual size_t | getCountDepth () const |
| Returns the number of elements in the FIFO. | |
| virtual time_t | expectedWaitTimeMilliSec () const |
| Returns the expected time it will take to service all messages currently in the queue (in milli-seconds) | |
| virtual time_t | averageServiceTimeMicroSec () const |
| Returns the average time it takes for individual messages to be serviced (in micro-seconds) | |
Public Member Functions inherited from resip::FifoStatsInterface | |
| FifoStatsInterface () | |
| virtual | ~FifoStatsInterface () |
| uint8_t | getRole () const |
| void | setRole (uint8_t role) |
| void | setDescription (const resip::Data &description) |
| Sets the description for this fifo. | |
| virtual const resip::Data & | getDescription () const |
| Gets the description for this fifo. | |
A templated, threadsafe message-queue class.
| typedef AbstractFifo<Msg*>::Messages resip::Fifo< Msg >::Messages |
| resip::Fifo< Msg >::Fifo | ( | AsyncProcessHandler * | interruptor = 0 | ) |
|
virtual |
| size_t resip::Fifo< Msg >::add | ( | Msg * | msg | ) |
| size_t resip::Fifo< Msg >::addMultiple | ( | Messages & | msgs | ) |
|
virtual |
delete all elements in the queue
Reimplemented from resip::AbstractFifo< Msg * >.
| bool resip::Fifo< Msg >::getMultiple | ( | int | ms, |
| Messages & | other, | ||
| unsigned int | max | ||
| ) |
| void resip::Fifo< Msg >::getMultiple | ( | Messages & | other, |
| unsigned int | max | ||
| ) |
| Msg * resip::Fifo< Msg >::getNext | ( | ) |
| Msg * resip::Fifo< Msg >::getNext | ( | int | ms | ) |
Returns the next message available.
Will wait up to ms milliseconds if no information is available. If the specified time passes or a signal interrupts the wait, this method returns 0. This interface provides no mechanism to distinguish between timeout and interrupt.
| void resip::Fifo< Msg >::setInterruptor | ( | AsyncProcessHandler * | interruptor | ) |