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()
|
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 | ) |
Definition at line 208 of file peer_select.cc.
References abortWaiting(), assert, ping_data::deadline(), ping_data::monitorRegistration, npos(), PeerSelector::ping, selectors, and startWaiting().
Referenced by PeerSelector::cancelPingTimeoutMonitoring().
◆ monitor()
void PeerSelectorPingMonitor::monitor | ( | PeerSelector * | selector | ) |
Definition at line 192 of file peer_select.cc.
References abortWaiting(), assert, ping_data::deadline(), ping_data::monitorRegistration, PeerSelector::ping, selectors, and startWaiting().
Referenced by PeerSelector::startPingWaiting().
◆ noteWaitOver()
|
private |
Definition at line 168 of file peer_select.cc.
References abortWaiting(), CallBack(), current_time, selectors, and startWaiting().
Referenced by NoteWaitOver().
◆ NoteWaitOver()
|
staticprivate |
Definition at line 142 of file peer_select.cc.
References assert, and noteWaitOver().
Referenced by abortWaiting(), and startWaiting().
◆ 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()
|
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
|
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:
- src/peer_select.cc