Collaboration diagram for PeerSelectorPingMonitor:

Public Member Functions

void monitor (PeerSelector *)
 registers the given selector to be notified about the IPC ping timeout More...
 
void forget (PeerSelector *)
 removes a PeerSelector from the waiting list More...
 
WaitingPeerSelectorPosition npos ()
 

Private Member Functions

void startWaiting ()
 schedules a single event to represent all waiting selectors More...
 
void abortWaiting ()
 undoes an earlier startWaiting() call More...
 
void noteWaitOver ()
 calls back all ready PeerSelectors and continues to wait for others More...
 

Static Private Member Functions

static void NoteWaitOver (void *monitor)
 PeerSelectorPingMonitor::noteWaitOver() wrapper. More...
 

Private Attributes

WaitingPeerSelectors selectors
 

Detailed Description

An ICP ping timeout service. Protects event.cc (which is designed to handle a few unrelated timeouts) from exposure to thousands of ping-related timeouts on busy proxies.

Definition at line 108 of file peer_select.cc.

Member Function Documentation

◆ abortWaiting()

void PeerSelectorPingMonitor::abortWaiting ( )
private

Definition at line 159 of file peer_select.cc.

References eventDelete(), and NoteWaitOver().

Referenced by forget(), monitor(), and noteWaitOver().

◆ forget()

void PeerSelectorPingMonitor::forget ( PeerSelector selector)

◆ monitor()

void PeerSelectorPingMonitor::monitor ( PeerSelector selector)

◆ noteWaitOver()

void PeerSelectorPingMonitor::noteWaitOver ( )
private

Definition at line 168 of file peer_select.cc.

References abortWaiting(), CallBack(), current_time, selectors, and startWaiting().

Referenced by NoteWaitOver().

◆ NoteWaitOver()

void PeerSelectorPingMonitor::NoteWaitOver ( void *  monitor)
staticprivate

Definition at line 142 of file peer_select.cc.

References assert, and noteWaitOver().

Referenced by abortWaiting(), and startWaiting().

◆ npos()

WaitingPeerSelectorPosition PeerSelectorPingMonitor::npos ( )
inline
Returns
a (nil) registration of a non-waiting peer selector

Definition at line 118 of file peer_select.cc.

References selectors.

Referenced by forget().

◆ startWaiting()

void PeerSelectorPingMonitor::startWaiting ( )
private

Definition at line 150 of file peer_select.cc.

References assert, current_time, eventAdd(), NoteWaitOver(), selectors, and tvSubDsec().

Referenced by forget(), monitor(), and noteWaitOver().

Member Data Documentation

◆ selectors

WaitingPeerSelectors PeerSelectorPingMonitor::selectors
private
See also
WaitingPeerSelectors

Definition at line 127 of file peer_select.cc.

Referenced by forget(), monitor(), noteWaitOver(), npos(), and startWaiting().


The documentation for this class was generated from the following file:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors