OverSim
|
This class contains all send messages and their timestamp. More...
#include <GiaMessageBookkeeping.h>
Classes | |
class | GiaNodeQueueCompare |
struct | MessageItem |
Public Member Functions | |
GiaMessageBookkeeping (GiaNeighbors *neighbors, uint32_t timeout) | |
Constructor. | |
~GiaMessageBookkeeping () | |
Destructor. | |
uint32_t | getSize () |
void | addMessage (GiaIDMessage *msg) |
Add GiaMessage to MessageBookkeeping. | |
void | removeMessage (GiaIDMessage *msg) |
Removes GiaMessage from MessageBookkeeping. | |
bool | contains (GiaIDMessage *msg) |
NodeHandle | getNextHop (GiaIDMessage *msg) |
void | removeTimedoutMessages () |
Removes timedout messages from list. |
Protected Attributes | |
std::map< OverlayKey, MessageItem > | messages |
contains all sent messages | |
GiaNeighbors * | neighbors |
pointer to our neighbor list | |
uint32_t | timeout |
This class contains all send messages and their timestamp.
It is used for timing out old messages and for biased random walk.
Definition at line 42 of file GiaMessageBookkeeping.h.
GiaMessageBookkeeping::GiaMessageBookkeeping | ( | GiaNeighbors * | neighbors, |
uint32_t | timeout | ||
) |
Constructor.
neighbors | Pointer to neighbors-list |
timeout | Value for timing out old messages |
Definition at line 30 of file GiaMessageBookkeeping.cc.
GiaMessageBookkeeping::~GiaMessageBookkeeping | ( | ) |
void GiaMessageBookkeeping::addMessage | ( | GiaIDMessage * | msg | ) |
Add GiaMessage to MessageBookkeeping.
msg | This is a GiaIDMessage |
Definition at line 44 of file GiaMessageBookkeeping.cc.
Referenced by Gia::forwardMessage().
bool GiaMessageBookkeeping::contains | ( | GiaIDMessage * | msg | ) |
msg | This is a GiaIDMessage |
Definition at line 69 of file GiaMessageBookkeeping.cc.
Referenced by Gia::forwardMessage().
NodeHandle GiaMessageBookkeeping::getNextHop | ( | GiaIDMessage * | msg | ) |
msg | This is a GiaIDMessage |
Definition at line 78 of file GiaMessageBookkeeping.cc.
Referenced by Gia::forwardMessage().
uint32_t GiaMessageBookkeeping::getSize | ( | ) |
Definition at line 39 of file GiaMessageBookkeeping.cc.
void GiaMessageBookkeeping::removeMessage | ( | GiaIDMessage * | msg | ) |
Removes GiaMessage from MessageBookkeeping.
msg | This is a GiaIDMessage |
Definition at line 61 of file GiaMessageBookkeeping.cc.
void GiaMessageBookkeeping::removeTimedoutMessages | ( | ) |
Removes timedout messages from list.
Definition at line 124 of file GiaMessageBookkeeping.cc.
Referenced by Gia::handleTimerEvent().
|
protected |
contains all sent messages
Definition at line 107 of file GiaMessageBookkeeping.h.
Referenced by addMessage(), contains(), getNextHop(), getSize(), removeMessage(), and removeTimedoutMessages().
|
protected |
pointer to our neighbor list
Definition at line 108 of file GiaMessageBookkeeping.h.
Referenced by addMessage(), getNextHop(), and GiaMessageBookkeeping().
|
protected |
Definition at line 109 of file GiaMessageBookkeeping.h.
Referenced by GiaMessageBookkeeping(), and removeTimedoutMessages().