Classes | Public Member Functions

dtn::routing::NeighborDatabase Class Reference

#include <NeighborDatabase.h>

Inherits ibrcommon::Mutex.

Collaboration diagram for dtn::routing::NeighborDatabase:
Collaboration graph
[legend]

List of all members.

Classes

class  AlreadyInTransitException
class  BloomfilterNotAvailableException
class  NeighborEntry
class  NeighborNotAvailableException
class  NoMoreTransfersAvailable

Public Member Functions

 NeighborDatabase ()
virtual ~NeighborDatabase ()
NeighborDatabase::NeighborEntryget (const dtn::data::EID &eid) throw (NeighborNotAvailableException)
NeighborDatabase::NeighborEntrycreate (const dtn::data::EID &eid)
NeighborDatabase::NeighborEntryreset (const dtn::data::EID &eid)
void remove (const dtn::data::EID &eid)
void addBundle (const dtn::data::EID &neighbor, const dtn::data::MetaBundle &b)
void expire (const size_t timestamp)

Detailed Description

The neighbor database contains collected information about neighbors. This includes the last timestamp on which a neighbor was seen, the bundles this neighbors has received (bloomfilter with age).

Definition at line 28 of file NeighborDatabase.h.


Constructor & Destructor Documentation

dtn::routing::NeighborDatabase::NeighborDatabase (  ) 

Definition at line 124 of file NeighborDatabase.cpp.

dtn::routing::NeighborDatabase::~NeighborDatabase (  )  [virtual]

Definition at line 128 of file NeighborDatabase.cpp.


Member Function Documentation

void dtn::routing::NeighborDatabase::addBundle ( const dtn::data::EID neighbor,
const dtn::data::MetaBundle b 
)

Add a bundle id to the bloomfilter of a neighbor

Definition at line 172 of file NeighborDatabase.cpp.

References dtn::routing::NeighborDatabase::NeighborEntry::add().

Referenced by dtn::routing::BaseRouter::raiseEvent().

Here is the call graph for this function:

NeighborDatabase::NeighborEntry & dtn::routing::NeighborDatabase::create ( const dtn::data::EID eid  ) 

Query a neighbor entry of the database. If the entry does not exists, a new entry is created and returned.

Parameters:
eid The EID of the neighbor.
Returns:
The neighbor entry reference.

Definition at line 138 of file NeighborDatabase.cpp.

Referenced by dtn::routing::BaseRouter::raiseEvent().

void dtn::routing::NeighborDatabase::expire ( const size_t  timestamp  ) 

trigger expire mechanisms for bloomfilter and bundle summary

Parameters:
timestamp 

Definition at line 84 of file NeighborDatabase.cpp.

Referenced by dtn::routing::BaseRouter::raiseEvent().

NeighborDatabase::NeighborEntry & dtn::routing::NeighborDatabase::get ( const dtn::data::EID eid  )  throw (NeighborNotAvailableException)

Query a neighbor entry of the database. It throws an exception if the neighbor is not available.

Parameters:
eid The EID of the neighbor
Returns:
The neighbor entry reference.

Definition at line 149 of file NeighborDatabase.cpp.

Referenced by dtn::routing::EpidemicRoutingExtension::notify(), dtn::routing::BaseRouter::raiseEvent(), dtn::routing::StaticRoutingExtension::run(), dtn::routing::FloodRoutingExtension::run(), dtn::routing::EpidemicRoutingExtension::run(), and dtn::routing::BaseRouter::Extension::transferTo().

void dtn::routing::NeighborDatabase::remove ( const dtn::data::EID eid  ) 

Remove an entry of the database.

Parameters:
eid The EID of the neighbor to remove.

Definition at line 167 of file NeighborDatabase.cpp.

NeighborDatabase::NeighborEntry & dtn::routing::NeighborDatabase::reset ( const dtn::data::EID eid  ) 

reset bloom filter of this neighbor

Parameters:
eid 
Returns:

Definition at line 159 of file NeighborDatabase.cpp.

References dtn::routing::NeighborDatabase::NeighborEntry::reset().

Referenced by dtn::routing::BaseRouter::raiseEvent().

Here is the call graph for this function:


The documentation for this class was generated from the following files: