DelayQueue< _Entry > Class Template Reference

Entries can be added to the queue at any rate. More...

#include <delay_queue.hh>

List of all members.

Public Types

typedef XorpCallback1< void,
_Entry >::RefPtr 

Public Member Functions

 DelayQueue (EventLoop &eventloop, uint32_t delay, DelayCallback forward)
void add (_Entry entry)
 Add an entry to the queue.
void fire ()
 Start the timer running but don't add anything to the queue.

Private Member Functions

void next ()
 Invoked from the timer to take the next entry from the queue.

Private Attributes

deque< _Entry > _queue
const uint32_t _delay
DelayCallback _forward
XorpTimer _timer

Detailed Description

template<typename _Entry>
class DelayQueue< _Entry >

Entries can be added to the queue at any rate.

The callback is invoked at the specified period to remove an entry from the queue.

Member Function Documentation

template<typename _Entry>
void DelayQueue< _Entry >::add ( _Entry  entry)

Add an entry to the queue.

If the entry is already on the queue it is not added again.

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations