OverSim
|
#include <NeighborCache.h>
Classes | |
struct | NeighborCacheEntry |
struct | WaitingContext |
Public Member Functions | |
~NeighborCache () | |
bool | isEnabled () |
const TransportAddress & | getBootstrapNode () |
bool | piggybackOwnCoords () |
const AbstractNcs & | getNcsAccess () const |
const NodeHandle & | getOverlayThisNode () |
uint16_t | getNeighborCacheSize () |
bool | isEntry (const TransportAddress &node) |
simtime_t | getNodeAge (const TransportAddress &handle) |
const NodeHandle & | getNodeHandle (const TransportAddress &add) |
simtime_t | getNodeTimeout (const NodeHandle &node) |
Caclulation of reasonable timout value. | |
TransportAddress | getNearestNode (uint8_t maxLayer) |
double | getAvgAbsPredictionError () |
std::vector< TransportAddress > * | getClosestNodes (uint8_t number) |
std::vector< TransportAddress > * | getSpreadedNodes (uint8_t number) |
void | updateNode (const NodeHandle &add, simtime_t rtt, const NodeHandle &srcRoute=NodeHandle::UNSPECIFIED_NODE, AbstractNcsNodeInfo *ncsInfo=NULL) |
void | updateNcsInfo (const TransportAddress &node, AbstractNcsNodeInfo *ncsInfo) |
void | setNodeTimeout (const TransportAddress &handle) |
Prox | getProx (const TransportAddress &node, NeighborCacheQueryType type=NEIGHBORCACHE_AVAILABLE, int rpcId=-1, ProxListener *listener=NULL, cPolymorphic *contextPointer=NULL) |
Gets the proximity of a node. | |
Prox | estimateProx (const TransportAddress &node) |
Estimates a Prox value of node, in relation to this node, based on information collected by the overlay. | |
const AbstractNcsNodeInfo * | getNodeCoordsInfo (const TransportAddress &node) |
Returns the coordinate information of a node. | |
TreeManagement * | getTreeManager () |
Returns a pointer to the treeManager Module. | |
std::pair< simtime_t, simtime_t > | getMeanVarRtt (const TransportAddress &node, bool returnVar) |
Public Member Functions inherited from BaseApp | |
BaseApp () | |
virtual | ~BaseApp () |
virtual destructor | |
Public Member Functions inherited from BaseRpc | |
BaseRpc () | |
const NodeHandle & | getThisNode () |
Returns the NodeHandle of this node. | |
simtime_t | getUdpTimeout () |
Public Member Functions inherited from RpcListener | |
virtual | ~RpcListener () |
destructor | |
Public Member Functions inherited from BaseTcpSupport | |
virtual void | socketDataArrived (int connId, void *yourPtr, cPacket *msg, bool urgent) |
virtual void | socketEstablished (int connId, void *yourPtr) |
virtual void | socketPeerClosed (int connId, void *yourPtr) |
virtual void | socketFailure (int connId, void *yourPtr, int code) |
virtual void | socketStatusArrived (int connId, void *yourPtr, TCPStatusInfo *status) |
Protected Types | |
typedef UNORDERED_MAP < TransportAddress, NeighborCacheEntry >::iterator | NeighborCacheIterator |
typedef UNORDERED_MAP < TransportAddress, NeighborCacheEntry > ::const_iterator | NeighborCacheConstIterator |
typedef std::multimap < simtime_t, TransportAddress > ::iterator | neighborCacheExpireMapIterator |
Protected Member Functions | |
void | initializeApp (int stage) |
initializes derived class-attributes | |
void | finishApp () |
collects statistical data of derived app | |
virtual CompType | getThisCompType () |
Return the component type of this module. | |
void | handleTimerEvent (cMessage *msg) |
void | queryProx (const TransportAddress &node, int rpcId, ProxListener *listener, cPolymorphic *contextPointer) |
Sends a pingNode call based on parameters from a getProx call. | |
bool | handleRpcCall (BaseCallMessage *msg) |
Coord / RTT measuring rpc stuff goes here. | |
void | handleReadyMessage (CompReadyMessage *msg) |
handle ready message - build tree topology | |
simtime_t | getRttBasedTimeout (const NodeHandle &node) |
simtime_t | getNcsBasedTimeout (const NodeHandle &node) |
void | callbackDiscoveryFinished (const TransportAddress &nearNode) |
Protected Member Functions inherited from BaseApp | |
int | numInitStages () const |
method to set InitStage | |
void | initialize (int stage) |
initializes base class-attributes | |
void | handleMessage (cMessage *msg) |
checks for message type and calls corresponding method | |
virtual void | receiveChangeNotification (int category, const cPolymorphic *details) |
callback-method for events at the NotificationBoard | |
virtual void | handleTransportAddressChangedNotification () |
This method gets call if the node has a new TransportAddress (IP address) because he changed his access network. | |
virtual void | handleNodeLeaveNotification () |
This method gets call **.gracefulLeaveDelay seconds before it is killed. | |
virtual void | handleNodeGracefulLeaveNotification () |
This method gets call **.gracefulLeaveDelay seconds before it is killed if this node is among the gracefulLeaveProbability nodes. | |
void | finish () |
collects statistical data | |
void | callRoute (const OverlayKey &key, cPacket *msg, const TransportAddress &hint=TransportAddress::UNSPECIFIED_NODE, RoutingType routingType=DEFAULT_ROUTING) |
Common API function: calls route-method in overlay. | |
void | callRoute (const OverlayKey &key, cPacket *msg, const std::vector< TransportAddress > &sourceRoute, RoutingType routingType=DEFAULT_ROUTING) |
virtual void | deliver (OverlayKey &key, cMessage *msg) |
Common API function: handles delivered messages from overlay. | |
virtual void | forward (OverlayKey *key, cPacket **msg, NodeHandle *nextHopNode) |
Common API function: handles messages from overlay to be forwarded. | |
virtual void | update (const NodeHandle &node, bool joined) |
Common API function: informs application about neighbors and own nodeID. | |
NodeVector * | callLocalLookup (const OverlayKey &key, int num, bool safe) |
Common API function: produces a list of nodes that can be used as next hops towards key. | |
NodeVector * | callNeighborSet (int num) |
Common API function: produces a list of neighbor nodes. | |
bool | isSiblingFor (const NodeHandle &node, const OverlayKey &key, int numSiblings, bool *err) |
Query if a node is among the siblings for a given key. | |
virtual void | handleLowerMessage (cMessage *msg) |
processes self-messages | |
virtual void | handleUpperMessage (cMessage *msg) |
handleUpperMessage gets called of handleMessage(cMessage* msg) if msg arrivedOn from_upperTier (currently msg gets deleted in this function) | |
virtual void | handleUDPMessage (cMessage *msg) |
method to handle messages that come directly from the UDP gate | |
virtual void | bindToPort (int port) |
Tells UDP we want to get all packets arriving on the given port. | |
virtual void | sendMessageToUDP (const TransportAddress &destAddr, cPacket *msg, simtime_t delay=SIMTIME_ZERO) |
Sends a packet over UDP. | |
virtual void | handleTraceMessage (cMessage *msg) |
handleTraceMessage gets called of handleMessage(cMessage* msg) if a message arrives at trace_in. | |
void | sendMessageToLowerTier (cPacket *msg) |
sends non-commonAPI message to the lower tier | |
bool | internalHandleRpcCall (BaseCallMessage *msg) |
Handles internal rpc requests. | |
void | internalHandleRpcResponse (BaseResponseMessage *msg, cPolymorphic *context, int rpcId, simtime_t rtt) |
Handles rpc responses internal in base classes | |
void | internalSendRouteRpc (BaseRpcMessage *message, const OverlayKey &destKey, const std::vector< TransportAddress > &sourceRoute, RoutingType routingType) |
void | sendReadyMessage (bool ready=true, const OverlayKey &nodeId=OverlayKey::UNSPECIFIED_KEY) |
Protected Member Functions inherited from BaseRpc | |
virtual void | internalHandleRpcTimeout (BaseCallMessage *msg, const TransportAddress &dest, cPolymorphic *context, int rpcId, const OverlayKey &destKey) |
Handles rpc timeouts internal in base classes | |
void | initRpcs () |
Initializes Remote-Procedure state. | |
void | finishRpcs () |
Deinitializes Remote-Procedure state. | |
virtual void | internalHandleRpcMessage (BaseRpcMessage *msg) |
Handles incoming rpc messages and delegates them to the corresponding listeners or handlers. | |
uint32_t | sendRouteRpcCall (CompType destComp, const TransportAddress &dest, const OverlayKey &destKey, BaseCallMessage *msg, cPolymorphic *context=NULL, RoutingType routingType=DEFAULT_ROUTING, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL) |
Routes a Remote-Procedure-Call message to an OverlayKey. | |
uint32_t | sendRouteRpcCall (CompType destComp, const OverlayKey &destKey, BaseCallMessage *msg, cPolymorphic *context=NULL, RoutingType routingType=DEFAULT_ROUTING, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL) |
Routes a Remote-Procedure-Call message to an OverlayKey. | |
uint32_t | sendRouteRpcCall (CompType destComp, const TransportAddress &dest, BaseCallMessage *msg, cPolymorphic *context=NULL, RoutingType routingType=DEFAULT_ROUTING, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL) |
Sends a Remote-Procedure-Call message using the overlay's UDP port This replaces ROUTE_DIRECT calls! | |
uint32_t | sendUdpRpcCall (const TransportAddress &dest, BaseCallMessage *msg, cPolymorphic *context=NULL, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL) |
Sends a Remote-Procedure-Call message to the underlay | |
uint32_t | sendInternalRpcCall (CompType destComp, BaseCallMessage *msg, cPolymorphic *context=NULL, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL) |
Sends an internal Remote-Procedure-Call between two tiers | |
void | cancelRpcMessage (uint32_t nonce) |
Cancels a Remote-Procedure-Call. | |
void | cancelAllRpcs () |
Cancels all RPCs. | |
void | sendRpcResponse (TransportType transportType, CompType destComp, const TransportAddress &dest, const OverlayKey &destKey, BaseCallMessage *call, BaseResponseMessage *response) |
Send Remote-Procedure response message and deletes call message. | |
void | sendRpcResponse (BaseCallMessage *call, BaseResponseMessage *response) |
Send Remote-Procedure response message to UDP and deletes call message. | |
int | pingNode (const TransportAddress &dest, simtime_t timeout=-1, int retries=0, cPolymorphic *context=NULL, const char *caption="PING", RpcListener *rpcListener=NULL, int rpcId=-1, TransportType transportType=INVALID_TRANSPORT) |
ping a node by its TransportAddress | |
virtual void | pingResponse (PingResponse *pingResponse, cPolymorphic *context, int rpcId, simtime_t rtt) |
virtual void | pingTimeout (PingCall *pingCall, const TransportAddress &dest, cPolymorphic *context, int rpcId) |
bool | internalHandleMessage (cMessage *msg) |
Protected Member Functions inherited from RpcListener | |
virtual void | handleRpcResponse (BaseResponseMessage *msg, cPolymorphic *context, int rpcId, simtime_t rtt) |
This method is called if an RPC response has been received. | |
virtual void | handleRpcResponse (BaseResponseMessage *msg, const RpcState &rpcState, simtime_t rtt) |
This method is called if an RPC response has been received. | |
virtual void | handleRpcTimeout (BaseCallMessage *msg, const TransportAddress &dest, cPolymorphic *context, int rpcId, const OverlayKey &destKey) |
This method is called if an RPC timeout has been reached. | |
virtual void | handleRpcTimeout (const RpcState &rpcState) |
This method is called if an RPC timeout has been reached. | |
Protected Member Functions inherited from BaseTcpSupport | |
void | handleTCPMessage (cMessage *msg) |
Member function to handle incoming TCP messages. | |
void | bindAndListenTcp (int port) |
Member function to bind service to the specified port and listen afterwards. | |
bool | isAlreadyConnected (TransportAddress address) |
Member function to check if the service is already connected. | |
void | establishTcpConnection (TransportAddress address) |
Member function to establish a connection to the specified node. | |
void | sendTcpData (cPacket *msg, TransportAddress address) |
Member function to send TCP data to the specified node. | |
virtual void | handleConnectionEvent (EvCode code, TransportAddress address) |
Member function to handle passive connection events. | |
virtual void | handleDataReceived (TransportAddress address, cPacket *msg, bool urgent) |
Member function to handle incoming data. | |
virtual void | handleIncomingConnection (TransportAddress address) |
Member function to handle newly opened connections. | |
void | closeTcpConnection (TransportAddress address) |
Member function to close an established connection. | |
void | setTcpOut (cGate *gate) |
Member function to set local gate towards the TCP module during init phase. | |
cGate * | getTcpOut () |
Member function to get local gate towards the TCP module. |
Protected Attributes | |
GlobalStatistics * | globalStatistics |
UNORDERED_MAP < TransportAddress, NeighborCacheEntry > | neighborCache |
std::multimap< simtime_t, TransportAddress > | neighborCacheExpireMap |
ProxAddressVector * | closestNodes |
Protected Attributes inherited from BaseApp | |
UnderlayConfigurator * | underlayConfigurator |
pointer to UnderlayConfigurator in this node | |
GlobalNodeList * | globalNodeList |
pointer to GlobalNodeList in this node | |
GlobalStatistics * | globalStatistics |
pointer to GlobalStatistics module in this node | |
NotificationBoard * | notificationBoard |
pointer to NotificationBoard in this node | |
bool | debugOutput |
debug output yes/no? | |
int | numOverlaySent |
number of sent packets to overlay | |
int | bytesOverlaySent |
number of sent bytes to overlay | |
int | numOverlayReceived |
number of received packets from overlay | |
int | bytesOverlayReceived |
number of received bytes from overlay | |
int | numUdpSent |
number of sent packets to UDP | |
int | bytesUdpSent |
number of sent bytes to UDP | |
int | numUdpReceived |
number of received packets from UDP | |
int | bytesUdpReceived |
number of received bytes from UDP | |
simtime_t | creationTime |
simTime when the App has been created | |
Protected Attributes inherited from BaseRpc | |
NodeHandle | thisNode |
NodeHandle to this node. | |
BaseOverlay * | overlay |
bool | debugOutput |
debug output ? | |
GlobalStatistics * | globalStatistics |
pointer to GlobalStatistics module in this node | |
CompType | thisCompType |
NeighborCache * | neighborCache |
pointer to the neighbor cache | |
CryptoModule * | cryptoModule |
pointer to CryptoModule | |
int | numPingSent |
int | bytesPingSent |
int | numPingResponseSent |
int | bytesPingResponseSent |
Private Types | |
enum | NeighborCacheRttState { RTTSTATE_VALID, RTTSTATE_UNKNOWN, RTTSTATE_TIMEOUT, RTTSTATE_WAITING } |
typedef std::vector < WaitingContext > | WaitingContexts |
typedef std::pair< simtime_t, NeighborCacheRttState > | Rtt |
Private Member Functions | |
bool | cleanupCache () |
void | updateEntry (const TransportAddress &address, simtime_t insertTime) |
Prox | getCoordinateBasedProx (const TransportAddress &node) |
void | recordNcsEstimationError (const NodeHandle &handle, simtime_t rtt) |
bool | insertNodeContext (const TransportAddress &handle, cPolymorphic *context, ProxListener *rpcListener, int rpcId) |
NeighborCache::WaitingContexts | getNodeContexts (const TransportAddress &handle) |
Rtt | getNodeRtt (const TransportAddress &add) |
void | pingResponse (PingResponse *response, cPolymorphic *context, int rpcId, simtime_t rtt) |
void | pingTimeout (PingCall *call, const TransportAddress &dest, cPolymorphic *context, int rpcId) |
void | prepareOverlay () |
void | setCbrNodeId () |
Private Attributes | |
bool | enableNeighborCache |
uint8_t | collectClosestNodes |
simtime_t | rttExpirationTime |
uint32_t | maxSize |
bool | discoveryFinished |
uint32_t | misses |
uint32_t | hits |
AbstractNcs * | ncs |
TreeManagement * | treeManager |
GlobalViewBuilder * | globalViewBuilder |
bool | capReqFinished |
bool | ncsPiggybackOwnCoords |
bool | useNcsForTimeout |
StdProxComparator * | proxComparator |
DiscoveryMode * | discoveryMode |
CoordBasedRouting * | coordBasedRouting |
NeighborCacheQueryType | defaultQueryType |
NeighborCacheQueryType | defaultQueryTypeI |
NeighborCacheQueryType | defaultQueryTypeQ |
cMessage * | landmarkTimer |
cMessage * | cbrTimer |
std::map< TransportAddress, std::vector< double > > | lastAbsoluteErrorPerNode |
uint32_t | numMsg |
double | absoluteError |
double | relativeError |
uint32_t | numRttErrorToHigh |
uint32_t | numRttErrorToLow |
uint32_t | rttHistory |
double | timeoutAccuracyLimit |
Static Private Attributes | |
static const std::vector< double > | coordsDummy |
static const double | RTT_TIMEOUT_ADJUSTMENT = 1.3 |
static const double | NCS_TIMEOUT_CONSTANT = 0.350 |
Friends | |
class | Nps |
class | SimpleUnderlayNCS |
class | TreeManagement |
class | GlobalViewBuilder |
class | DiscoveryMode |
std::ostream & | operator<< (std::ostream &os, const NeighborCacheEntry &entry) |
Additional Inherited Members | |
Public Types inherited from BaseTcpSupport | |
enum | EvCode { NO_EST_CONNECTION, PEER_CLOSED, PEER_TIMEDOUT, PEER_REFUSED, CONNECTION_RESET, CONNECTION_SUCC_ClOSED } |
Definition at line 78 of file NeighborCache.h.
|
protected |
Definition at line 214 of file NeighborCache.h.
|
protected |
Definition at line 217 of file NeighborCache.h.
|
protected |
Definition at line 213 of file NeighborCache.h.
|
private |
Definition at line 169 of file NeighborCache.h.
|
private |
Definition at line 152 of file NeighborCache.h.
|
private |
Definition at line 162 of file NeighborCache.h.
NeighborCache::~NeighborCache | ( | ) |
Definition at line 222 of file NeighborCache.cc.
|
protected |
|
private |
Definition at line 501 of file NeighborCache.cc.
Referenced by insertNodeContext(), queryProx(), setNodeTimeout(), updateNcsInfo(), and updateNode().
Prox NeighborCache::estimateProx | ( | const TransportAddress & | node | ) |
Estimates a Prox value of node, in relation to this node, based on information collected by the overlay.
node | The node whose proximity will be requested. |
Definition at line 976 of file NeighborCache.cc.
Referenced by getProx().
|
protectedvirtual |
collects statistical data of derived app
Reimplemented from BaseApp.
Definition at line 194 of file NeighborCache.cc.
double NeighborCache::getAvgAbsPredictionError | ( | ) |
Definition at line 597 of file NeighborCache.cc.
Referenced by SVivaldi::calcError().
const TransportAddress & NeighborCache::getBootstrapNode | ( | ) |
Definition at line 1172 of file NeighborCache.cc.
std::vector< TransportAddress > * NeighborCache::getClosestNodes | ( | uint8_t | number | ) |
Definition at line 558 of file NeighborCache.cc.
Referenced by DiscoveryMode::handleRpcCall().
|
private |
Definition at line 1016 of file NeighborCache.cc.
Referenced by estimateProx(), and recordNcsEstimationError().
std::pair< simtime_t, simtime_t > NeighborCache::getMeanVarRtt | ( | const TransportAddress & | node, |
bool | returnVar | ||
) |
Definition at line 1076 of file NeighborCache.cc.
Referenced by getRttBasedTimeout().
|
inline |
Definition at line 264 of file NeighborCache.h.
Referenced by GlobalViewBuilder::cleanup(), Landmark::finishApp(), GlobalViewBuilder::handleCoordSendTimer(), Landmark::initializeApp(), BaseRpc::internalHandleRpcMessage(), DiscoveryMode::sendNewRequest(), BaseRpc::sendRpcResponse(), and DiscoveryMode::stop().
|
protected |
Definition at line 1145 of file NeighborCache.cc.
Referenced by getNodeTimeout().
TransportAddress NeighborCache::getNearestNode | ( | uint8_t | maxLayer | ) |
Definition at line 537 of file NeighborCache.cc.
|
inline |
Definition at line 271 of file NeighborCache.h.
simtime_t NeighborCache::getNodeAge | ( | const TransportAddress & | handle | ) |
Definition at line 492 of file NeighborCache.cc.
Referenced by getProx().
|
private |
Definition at line 278 of file NeighborCache.cc.
Referenced by setNodeTimeout(), and updateNode().
const AbstractNcsNodeInfo * NeighborCache::getNodeCoordsInfo | ( | const TransportAddress & | node | ) |
Returns the coordinate information of a node.
node | The node whose coordinate information will be requested. |
Definition at line 1026 of file NeighborCache.cc.
Referenced by Nps::coordsReqRpcResponse(), and getCoordinateBasedProx().
const NodeHandle & NeighborCache::getNodeHandle | ( | const TransportAddress & | add | ) |
Definition at line 483 of file NeighborCache.cc.
|
private |
Definition at line 457 of file NeighborCache.cc.
Referenced by Nps::coordsReqRpcResponse(), estimateProx(), and getProx().
simtime_t NeighborCache::getNodeTimeout | ( | const NodeHandle & | node | ) |
Caclulation of reasonable timout value.
node | the node an RPC is sent to |
Definition at line 1109 of file NeighborCache.cc.
Referenced by BaseRpc::sendRpcCall().
|
inline |
Prox NeighborCache::getProx | ( | const TransportAddress & | node, |
NeighborCacheQueryType | type = NEIGHBORCACHE_AVAILABLE , |
||
int | rpcId = -1 , |
||
ProxListener * | listener = NULL , |
||
cPolymorphic * | contextPointer = NULL |
||
) |
Gets the proximity of a node.
node | The node whose proximity will be requested. |
type | Request type. NEIGHBORCACHE_EXACT looks in the cache, and if no value is found, sends an RTT query to the node. NEIGHBORCACHE_AVAILABLE looks in the cache, and if no value is found returns Prox::PROX_UNKNOWN. NEIGHBORCACHE_ESTIMATED looks in the cache, and if no value is found calculates an estimate based on information collected by the overlay. NEIGHBORCACHE_QUERY always sends an RTT query to the node and returns Prox::PROX_UNKNOWN. |
rpcId | Identifier sent to the RPC to identify the call. |
listener | Module to be called back when an RTT response arrives. |
contextPointer | Pointer sent to the RPC to identify the call. IMPORTANT: contextPointer gets deleted (only) if no Ping call is sent! So, *contextpointer may be undefined! |
Definition at line 853 of file NeighborCache.cc.
Referenced by BasePastry::determineAliveTable(), getNcsBasedTimeout(), DiscoveryMode::handleRpcResponse(), Bamboo::lookupFinished(), BasePastry::pingNodes(), BasePastry::prePing(), and Kademlia::routingAdd().
|
protected |
Definition at line 1118 of file NeighborCache.cc.
Referenced by getNodeTimeout().
std::vector< TransportAddress > * NeighborCache::getSpreadedNodes | ( | uint8_t | number | ) |
Definition at line 570 of file NeighborCache.cc.
Referenced by DiscoveryMode::handleRpcCall().
|
inlineprotectedvirtual |
Return the component type of this module.
This method is overloaded by BaseOverlay/BaseApp and returns the appropriate component type of this module.
Reimplemented from BaseApp.
Definition at line 225 of file NeighborCache.h.
Referenced by TreeManagement::checkTreeChildNodes(), TreeManagement::handleRpcTimeout(), TreeManagement::registerAtParent(), TreeManagement::sendChildReleaseCall(), Nps::sendCoordsReqCall(), TreeManagement::sendMessageToChildren(), TreeManagement::sendMessageToParent(), DiscoveryMode::sendNewRequest(), and DiscoveryMode::start().
TreeManagement * NeighborCache::getTreeManager | ( | ) |
Returns a pointer to the treeManager Module.
Definition at line 1167 of file NeighborCache.cc.
Referenced by GlobalViewBuilder::handleCoordSendTimer(), and GlobalViewBuilder::initializeViewBuilder().
|
protectedvirtual |
handle ready message - build tree topology
Reimplemented from BaseApp.
Definition at line 658 of file NeighborCache.cc.
|
protectedvirtual |
Coord / RTT measuring rpc stuff goes here.
Reimplemented from BaseRpc.
Definition at line 814 of file NeighborCache.cc.
|
protectedvirtual |
Reimplemented from BaseRpc.
Definition at line 780 of file NeighborCache.cc.
|
protectedvirtual |
initializes derived class-attributes
stage | the init stage |
Reimplemented from BaseApp.
Definition at line 73 of file NeighborCache.cc.
|
private |
Definition at line 233 of file NeighborCache.cc.
Referenced by getProx().
|
inline |
Definition at line 258 of file NeighborCache.h.
Referenced by BasePastry::baseInit().
bool NeighborCache::isEntry | ( | const TransportAddress & | node | ) |
Definition at line 589 of file NeighborCache.cc.
Referenced by getCoordinateBasedProx(), getNcsBasedTimeout(), and getRttBasedTimeout().
|
inline |
|
private |
Definition at line 836 of file NeighborCache.cc.
|
private |
Definition at line 844 of file NeighborCache.cc.
|
private |
Definition at line 705 of file NeighborCache.cc.
Referenced by Nps::coordsReqRpcResponse(), handleReadyMessage(), GlobalViewBuilder::handleRpcResponse(), and DiscoveryMode::stop().
|
protected |
Sends a pingNode call based on parameters from a getProx call.
node | The node to which the pingNode call will be sent. |
rpcId | The rpcId that was passed to getProx. |
listener | The listener that was passed to getProx. |
contextPointer | The pointer that was passed to getProx. |
Definition at line 991 of file NeighborCache.cc.
Referenced by getProx().
|
private |
Definition at line 1036 of file NeighborCache.cc.
Referenced by updateNode().
|
private |
Definition at line 753 of file NeighborCache.cc.
Referenced by handleTimerEvent(), and prepareOverlay().
void NeighborCache::setNodeTimeout | ( | const TransportAddress & | handle | ) |
Definition at line 289 of file NeighborCache.cc.
Referenced by BaseRpc::internalHandleRpcMessage().
|
private |
Definition at line 524 of file NeighborCache.cc.
Referenced by insertNodeContext(), setNodeTimeout(), updateNcsInfo(), and updateNode().
void NeighborCache::updateNcsInfo | ( | const TransportAddress & | node, |
AbstractNcsNodeInfo * | ncsInfo | ||
) |
Definition at line 421 of file NeighborCache.cc.
void NeighborCache::updateNode | ( | const NodeHandle & | add, |
simtime_t | rtt, | ||
const NodeHandle & | srcRoute = NodeHandle::UNSPECIFIED_NODE , |
||
AbstractNcsNodeInfo * | ncsInfo = NULL |
||
) |
Definition at line 326 of file NeighborCache.cc.
Referenced by Nps::coordsReqRpcResponse(), and BaseRpc::internalHandleRpcMessage().
|
friend |
Definition at line 84 of file NeighborCache.h.
Referenced by initializeApp().
|
friend |
Definition at line 83 of file NeighborCache.h.
Referenced by initializeApp().
|
friend |
Definition at line 80 of file NeighborCache.h.
Referenced by initializeApp().
|
friend |
Definition at line 45 of file NeighborCache.cc.
|
friend |
Definition at line 81 of file NeighborCache.h.
Referenced by initializeApp().
|
friend |
Definition at line 82 of file NeighborCache.h.
Referenced by initializeApp().
|
private |
Definition at line 132 of file NeighborCache.h.
Referenced by finishApp(), initializeApp(), and recordNcsEstimationError().
|
private |
Definition at line 106 of file NeighborCache.h.
Referenced by initializeApp().
|
private |
Definition at line 124 of file NeighborCache.h.
Referenced by handleTimerEvent(), initializeApp(), prepareOverlay(), and ~NeighborCache().
|
protected |
Definition at line 219 of file NeighborCache.h.
Referenced by getBootstrapNode(), getClosestNodes(), initializeApp(), updateNode(), and ~NeighborCache().
|
private |
Definition at line 90 of file NeighborCache.h.
Referenced by initializeApp().
|
private |
Definition at line 115 of file NeighborCache.h.
Referenced by initializeApp(), prepareOverlay(), and setCbrNodeId().
|
staticprivate |
Definition at line 126 of file NeighborCache.h.
|
private |
Definition at line 117 of file NeighborCache.h.
Referenced by getProx(), and initializeApp().
|
private |
Definition at line 118 of file NeighborCache.h.
Referenced by getProx(), and initializeApp().
|
private |
Definition at line 119 of file NeighborCache.h.
Referenced by getProx(), and initializeApp().
|
private |
Definition at line 93 of file NeighborCache.h.
Referenced by initializeApp().
|
private |
Definition at line 114 of file NeighborCache.h.
Referenced by handleReadyMessage(), handleRpcCall(), initializeApp(), prepareOverlay(), and ~NeighborCache().
|
private |
Definition at line 88 of file NeighborCache.h.
Referenced by getNodeRtt(), getProx(), initializeApp(), insertNodeContext(), and isEnabled().
|
protected |
Definition at line 186 of file NeighborCache.h.
Referenced by Nps::coordsReqRpcResponse(), finishApp(), TreeManagement::finishTreeManagement(), TreeManagement::handleRpcCall(), TreeManagement::handleRpcResponse(), initializeApp(), recordNcsEstimationError(), TreeManagement::registerAtParent(), TreeManagement::sendChildReleaseCall(), TreeManagement::sendMessageToChildren(), TreeManagement::sendMessageToParent(), GlobalViewBuilder::spreadGlobalView(), and DiscoveryMode::stop().
|
private |
Definition at line 105 of file NeighborCache.h.
Referenced by handleReadyMessage(), handleRpcCall(), handleTimerEvent(), initializeApp(), prepareOverlay(), setCbrNodeId(), and ~NeighborCache().
|
private |
Definition at line 96 of file NeighborCache.h.
Referenced by finishApp(), getNodeRtt(), and initializeApp().
|
private |
Definition at line 123 of file NeighborCache.h.
|
private |
Definition at line 130 of file NeighborCache.h.
Referenced by initializeApp().
|
private |
Definition at line 92 of file NeighborCache.h.
Referenced by cleanupCache(), and initializeApp().
|
private |
Definition at line 95 of file NeighborCache.h.
Referenced by finishApp(), getNodeRtt(), and initializeApp().
|
private |
Definition at line 103 of file NeighborCache.h.
Referenced by estimateProx(), finishApp(), getAvgAbsPredictionError(), getCoordinateBasedProx(), getNcsAccess(), getNodeTimeout(), handleRpcCall(), handleTimerEvent(), initializeApp(), piggybackOwnCoords(), prepareOverlay(), recordNcsEstimationError(), setCbrNodeId(), updateNode(), and ~NeighborCache().
|
staticprivate |
Definition at line 180 of file NeighborCache.h.
Referenced by getNcsBasedTimeout().
|
private |
Definition at line 108 of file NeighborCache.h.
Referenced by initializeApp(), and piggybackOwnCoords().
|
protected |
Definition at line 212 of file NeighborCache.h.
Referenced by cleanupCache(), Nps::coordsReqRpcResponse(), estimateProx(), getAvgAbsPredictionError(), getBootstrapNode(), getMeanVarRtt(), getNearestNode(), getNeighborCacheSize(), getNodeAge(), getNodeContexts(), getNodeCoordsInfo(), getNodeHandle(), getNodeRtt(), getSpreadedNodes(), initializeApp(), insertNodeContext(), isEntry(), queryProx(), Nps::setLandmarkSet(), setNodeTimeout(), updateEntry(), updateNcsInfo(), and updateNode().
|
protected |
Definition at line 216 of file NeighborCache.h.
Referenced by cleanupCache(), Nps::coordsReqRpcResponse(), getAvgAbsPredictionError(), insertNodeContext(), queryProx(), setNodeTimeout(), updateEntry(), updateNcsInfo(), and updateNode().
|
private |
Definition at line 131 of file NeighborCache.h.
Referenced by finishApp(), initializeApp(), and recordNcsEstimationError().
|
private |
Definition at line 134 of file NeighborCache.h.
Referenced by finishApp(), initializeApp(), and recordNcsEstimationError().
|
private |
Definition at line 135 of file NeighborCache.h.
Referenced by finishApp(), initializeApp(), and recordNcsEstimationError().
|
private |
Definition at line 112 of file NeighborCache.h.
Referenced by initializeApp(), and ~NeighborCache().
|
private |
Definition at line 133 of file NeighborCache.h.
Referenced by finishApp(), initializeApp(), and recordNcsEstimationError().
|
staticprivate |
Definition at line 179 of file NeighborCache.h.
Referenced by getRttBasedTimeout().
|
private |
Definition at line 91 of file NeighborCache.h.
Referenced by getNodeRtt(), and initializeApp().
|
private |
Definition at line 136 of file NeighborCache.h.
Referenced by initializeApp(), and updateNode().
|
private |
Definition at line 137 of file NeighborCache.h.
Referenced by getNcsBasedTimeout(), and initializeApp().
|
private |
Definition at line 104 of file NeighborCache.h.
Referenced by finishApp(), getTreeManager(), handleReadyMessage(), handleRpcCall(), handleTimerEvent(), initializeApp(), pingResponse(), pingTimeout(), and ~NeighborCache().
|
private |
Definition at line 110 of file NeighborCache.h.
Referenced by getNodeTimeout(), and initializeApp().