DHT.cc File Reference

#include <IPAddressResolver.h>
#include "DHT.h"
#include <omnetpp.h>
#include <OverlayKey.h>
#include <SHA1.h>
#include <CommonMessages_m.h>
#include "DHTMessage_m.h"
#include <set>
#include <vector>
#include <map>
#include <sstream>
#include <NodeHandle.h>
#include <InitStages.h>
#include <BinaryValue.h>
#include <NodeVector.h>
#include "BaseApp.h"
#include <RpcMacros.h>
#include <BaseRpc.h>
#include <GlobalStatistics.h>

Go to the source code of this file.

Functions

 Define_Module (DHT)
std::ostream & operator<< (std::ostream &os, const DHT::PendingRpcsEntry &entry)

Detailed Description

Author:
Gregoire Menuel, Ingmar Baumgart
Ingmar Baumgart

Definition in file DHT.cc.


Function Documentation

Define_Module ( DHT   ) 
std::ostream& operator<< ( std::ostream &  os,
const DHT::PendingRpcsEntry entry 
)

Definition at line 957 of file DHT.cc.

00958 {
00959     if (entry.getCallMsg) {
00960         os << "GET";
00961     } else if (entry.putCallMsg) {
00962         os << "PUT";
00963     }
00964 
00965     os << " state: " << entry.state
00966        << " numSent: " << entry.numSent
00967        << " numResponses: " << entry.numResponses
00968        << " numFailed: " << entry.numFailed
00969        << " numAvailableReplica: " << entry.numAvailableReplica;
00970 
00971     if (entry.replica.size() > 0) {
00972         os << " replicaSize: " << entry.replica.size();
00973     }
00974 
00975     if (entry.hashVector != NULL) {
00976         os << " hashVectorSize: " << entry.hashVector->size();
00977     }
00978 
00979     if (entry.hashes.size() > 0) {
00980         os << " hashes:";
00981         std::map<BinaryValue, NodeVector>::const_iterator it;
00982 
00983         int i = 0;
00984         for (it = entry.hashes.begin(); it != entry.hashes.end(); it++, i++) {
00985             os << " hash" << i << ":" << it->second.size();
00986         }
00987     }
00988 
00989     return os;
00990 }

Generated on Wed May 26 16:21:15 2010 for OverSim by  doxygen 1.6.3