class UpdateQueue

Update Queue for RIP Route entries. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods

Protected Types

Protected Members


Detailed Description

The Update Queue has is conceptually a single writer multi-reader queue. It is used to store state for triggered updates and may be used unsolicited responses (routing table announcements).

typedef UpdateQueueReader<A> Reader

Reader

[protected]

typedef ref_ptr<Reader> ReadIterator

ReadIterator

typedef RouteEntryRef<A> RouteUpdate

RouteUpdate

 UpdateQueue ()

UpdateQueue

 ~UpdateQueue ()

~UpdateQueue

void  push_back (const RouteUpdate& ru)

push_back

Add update to back of queue.

void  flush ()

flush

Remove all queued entries and reset all read iterators to the front of the queue.

ReadIterator  create_reader ()

create_reader

Create a read iterator. These are reference counted entities that need to be stored in order to operate. The newly created reader is set to the end of the update queue.

void  destroy_reader (ReadIterator& r)

destroy_reader

Destroy read iterator. This method detaches the iterator from the update queue. Use of the iterator after this call is unsafe.

bool  reader_valid (const ReadIterator& r)

reader_valid

Check ReadIterator's validity.

Parameters:

rreader to be checked.

Returns: true if r is an active read iterator, false if iterator does not belong to this instance or has been destroyed.

const RouteEntry<A>*  next (ReadIterator& r)

next

Increment iterator and return pointer to entry if available.

Returns: A pointer to a RouteEntry if available, 0 otherwise.

const RouteEntry<A>*  get (ReadIterator& r)

get

[const]

Get the RouteEntry associated with the read iterator.

Returns: A pointer to a RouteEntry if available, 0 otherwise.

void  ffwd (ReadIterator& r)

ffwd

Advance read iterator to end of update queue. Calls to next and get will return 0 until further updates occur.

void  rwd (ReadIterator& r)

rwd

Move read iterator to first entry of update queue.

uint32_t  updates_queued ()

updates_queued

[const]

Return number of updates held. Note: this may be more than are available for reading since there is internal buffering and UpdateQueue iterators attach at the end of the UpdateQueue.

Returns: number of updates queued.

UpdateQueueImpl<A>* _impl

_impl

[protected]


Generated by: pavlin on possum.icir.org on Thu Mar 9 04:43:53 2006, using kdoc $.