IBR-DTNSuite
0.8
|
#include <NeighborDatabase.h>
Classes | |
class | AlreadyInTransitException |
class | BloomfilterNotAvailableException |
class | NeighborEntry |
class | NeighborNotAvailableException |
class | NoMoreTransfersAvailable |
Public Member Functions | |
NeighborDatabase () | |
virtual | ~NeighborDatabase () |
NeighborDatabase::NeighborEntry & | get (const dtn::data::EID &eid) throw (NeighborNotAvailableException) |
NeighborDatabase::NeighborEntry & | create (const dtn::data::EID &eid) |
NeighborDatabase::NeighborEntry & | reset (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) |
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 29 of file NeighborDatabase.h.
Definition at line 140 of file NeighborDatabase.cpp.
dtn::routing::NeighborDatabase::~NeighborDatabase | ( | ) | [virtual] |
Definition at line 144 of file NeighborDatabase.cpp.
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 187 of file NeighborDatabase.cpp.
References dtn::routing::NeighborDatabase::NeighborEntry::add().
Referenced by dtn::routing::BaseRouter::raiseEvent().
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.
eid | The EID of the neighbor. |
Definition at line 154 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
timestamp |
Definition at line 97 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.
eid | The EID of the neighbor |
Definition at line 165 of file NeighborDatabase.cpp.
Referenced by dtn::routing::NodeHandshakeExtension::processHandshake(), dtn::routing::BaseRouter::raiseEvent(), dtn::routing::NeighborRoutingExtension::run(), dtn::routing::FloodRoutingExtension::run(), dtn::routing::StaticRoutingExtension::run(), and dtn::routing::EpidemicRoutingExtension::run().
void dtn::routing::NeighborDatabase::remove | ( | const dtn::data::EID & | eid | ) |
Remove an entry of the database.
eid | The EID of the neighbor to remove. |
Definition at line 182 of file NeighborDatabase.cpp.
NeighborDatabase::NeighborEntry & dtn::routing::NeighborDatabase::reset | ( | const dtn::data::EID & | eid | ) |
reset bloom filter of this neighbor
eid |
Definition at line 175 of file NeighborDatabase.cpp.
References dtn::routing::NeighborDatabase::NeighborEntry::reset().
Referenced by dtn::routing::BaseRouter::raiseEvent().