Module with a global view on all currently stored DHT records (used by DHTTestApp).
More...
#include <GlobalDhtTestMap.h>
Static Private Attributes |
static const int | TEST_MAP_INTERVAL = 10 |
| interval in seconds for writing periodic statistical information
|
Detailed Description
Module with a global view on all currently stored DHT records (used by DHTTestApp).
- Author
- Ingmar Baumgart
Definition at line 50 of file GlobalDhtTestMap.h.
Constructor & Destructor Documentation
GlobalDhtTestMap::GlobalDhtTestMap |
( |
| ) |
|
GlobalDhtTestMap::~GlobalDhtTestMap |
( |
| ) |
|
Member Function Documentation
void GlobalDhtTestMap::eraseEntry |
( |
const OverlayKey & |
key | ) |
|
Definition at line 104 of file GlobalDhtTestMap.cc.
{
std::map<OverlayKey, DHTEntry>::iterator it =
dataMap.find(key);
return NULL;
} else {
return &(it->second);
}
}
void GlobalDhtTestMap::finish |
( |
| ) |
|
|
private |
const OverlayKey & GlobalDhtTestMap::getRandomKey |
( |
| ) |
|
Definition at line 115 of file GlobalDhtTestMap.cc.
{
}
std::map<OverlayKey, DHTEntry>::iterator it =
dataMap.end();
it =
dataMap.insert(make_pair(randomKey, tempEntry)).first;
}
}
return it->first;
}
void GlobalDhtTestMap::handleMessage |
( |
cMessage * |
msg | ) |
|
|
private |
Definition at line 68 of file GlobalDhtTestMap.cc.
{
"GlobalDhtTestMap: Number of stored DHT entries",
dataMap.size()));
} else if ((entryTimer = dynamic_cast<DhtTestEntryTimer*>(msg)) != NULL) {
delete msg;
} else {
throw cRuntimeError("GlobalDhtTestMap::handleMessage(): "
"Unknown message type!");
}
}
void GlobalDhtTestMap::initialize |
( |
| ) |
|
|
private |
size_t GlobalDhtTestMap::size |
( |
| ) |
|
|
inline |
Member Data Documentation
uint32_t GlobalDhtTestMap::p2pnsNameCount |
cMessage* GlobalDhtTestMap::periodicTimer |
|
private |
timer self-message for writing periodic statistical information
Definition at line 103 of file GlobalDhtTestMap.h.
const int GlobalDhtTestMap::TEST_MAP_INTERVAL = 10 |
|
staticprivate |
interval in seconds for writing periodic statistical information
Definition at line 99 of file GlobalDhtTestMap.h.
The documentation for this class was generated from the following files: