IBR-DTNSuite
0.12
|
#include <NeighborDatabase.h>
Classes | |
class | AlreadyInTransitException |
class | BloomfilterNotAvailableException |
class | DatasetNotAvailableException |
class | NeighborEntry |
class | NeighborNotAvailableException |
class | NoMoreTransfersAvailable |
class | NoRouteKnownException |
Public Member Functions | |
NeighborDatabase () | |
virtual | ~NeighborDatabase () |
NeighborDatabase::NeighborEntry & | get (const dtn::data::EID &eid, bool noCached=false) throw (NeighborNotAvailableException) |
NeighborDatabase::NeighborEntry & | create (const dtn::data::EID &eid) throw () |
void | remove (const dtn::data::EID &eid) |
void | expire (const dtn::data::Timestamp ×tamp) |
Public Member Functions inherited from ibrcommon::Mutex | |
Mutex (MUTEX_TYPE type=MUTEX_NORMAL) | |
virtual | ~Mutex () |
virtual void | trylock () throw (MutexException) |
virtual void | enter () throw (MutexException) |
virtual void | leave () throw (MutexException) |
Public Member Functions inherited from ibrcommon::MutexInterface | |
virtual | ~MutexInterface ()=0 |
Additional Inherited Members | |
Public Types inherited from ibrcommon::Mutex | |
enum | MUTEX_TYPE { MUTEX_NORMAL = PTHREAD_MUTEX_NORMAL, MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE, MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK } |
Static Public Member Functions inherited from ibrcommon::Mutex | |
static MutexInterface & | dummy () |
Protected Attributes inherited from ibrcommon::Mutex | |
pthread_mutex_t | m_mutex |
pthread_mutexattr_t | m_attr |
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 45 of file NeighborDatabase.h.
dtn::routing::NeighborDatabase::NeighborDatabase | ( | ) |
Definition at line 187 of file NeighborDatabase.cpp.
|
virtual |
Definition at line 191 of file NeighborDatabase.cpp.
NeighborDatabase::NeighborEntry & dtn::routing::NeighborDatabase::create | ( | const dtn::data::EID & | eid) | ||
throw | ( | ||||
) |
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 202 of file NeighborDatabase.cpp.
void dtn::routing::NeighborDatabase::expire | ( | const dtn::data::Timestamp & | timestamp) |
trigger expire mechanisms for bloomfilter and bundle summary
timestamp |
Definition at line 127 of file NeighborDatabase.cpp.
References dtn::routing::NeighborDatabase::NeighborEntry::expire(), and dtn::routing::NeighborDatabase::NeighborEntry::isExpired().
NeighborDatabase::NeighborEntry & dtn::routing::NeighborDatabase::get | ( | const dtn::data::EID & | eid, |
bool | noCached = false |
||
) | |||
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 |
noCached | Only returns an entry if the neighbor is available |
Definition at line 218 of file NeighborDatabase.cpp.
References dtn::core::BundleCore::getInstance().
Referenced by dtn::routing::NodeHandshakeExtension::processHandshake(), dtn::routing::ProphetRoutingExtension::processHandshake(), 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 235 of file NeighborDatabase.cpp.