xorp

UpdateQueueImpl< A > Class Template Reference

Internal implementation of UpdateQueue class. More...

List of all members.

Classes

struct  ReaderPos
 State associated with an UpdateQueue reader. More...

Public Member Functions

uint32_t add_reader ()
 Create state for a new reader.
void remove_reader (uint32_t id)
 Destroy state for reader.
void garbage_collect ()
 Remove blocks at front of queue who have no referrers.
bool advance_reader (uint32_t id)
 Advance position of reader by 1 update.
void ffwd_reader (uint32_t id)
 Fast forward reader to end of updates.
void rwd_reader (uint32_t id)
void flush ()
 Fast forward all readers to end of updates.
const RouteEntry< A > * read (uint32_t id)
 Get data associated with reader.
bool push_back (const RouteUpdate &u)
uint32_t updates_queued () const

Private Types

typedef UpdateQueue< A >
::RouteUpdate 
RouteUpdate
typedef list< UpdateBlock< A > > UpdateBlockList

Private Attributes

UpdateBlockList _update_blocks
vector< ReaderPos * > _readers
uint32_t _num_readers

Detailed Description

template<typename A>
class UpdateQueueImpl< A >

Internal implementation of UpdateQueue class.


Member Function Documentation

template<typename A>
uint32_t UpdateQueueImpl< A >::add_reader ( ) [inline]

Create state for a new reader.

Returns:
id for reader.
template<typename A>
bool UpdateQueueImpl< A >::advance_reader ( uint32_t  id) [inline]

Advance position of reader by 1 update.

Parameters:
idunique id of reader.
Returns:
true if reader advanced, false if reader has reached end.
template<typename A>
void UpdateQueueImpl< A >::ffwd_reader ( uint32_t  id) [inline]

Fast forward reader to end of updates.

Parameters:
idunique id of reader.
template<typename A>
void UpdateQueueImpl< A >::remove_reader ( uint32_t  id) [inline]

Destroy state for reader.

Parameters:
idunique id of reader.

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