|
Squid Web Cache master
|
forwards non-blocking IP cache lookup results to either IPH or IpReciever More...
Classes | |
| struct | firstLookupStart |
| time of the idnsALookup() call More... | |
| struct | lastLookupEnd |
| time of the last noteLookup() call More... | |
Public Member Functions | |
| IpCacheLookupForwarder () | |
| IpCacheLookupForwarder (const CbcPointer< Dns::IpReceiver > &receiver) | |
| IpCacheLookupForwarder (IPH *fun, void *data) | |
| void | finalCallback (const Dns::CachedIps *addrs, const Dns::LookupDetails &details) |
| forwards notification about the end of the lookup; last method to be called | |
| bool | forwardIp (const Ip::Address &ip) |
| void | forwardHits (const Dns::CachedIps &ips) |
| convenience wrapper to safely forwardIp() for each IP in the container | |
| void | lookupsStarting () |
| initialize lookup timestamps for Dns::LookupDetails delay calculation | |
| void | forwardLookup (const char *error) |
| inform recipient of a finished lookup | |
| int | totalResponseTime () const |
Protected Member Functions | |
| int | additionalLookupDelay () const |
Private Attributes | |
| CbcPointer< Dns::IpReceiver > | receiverObj |
| gets incremental and final results | |
| IPH * | receiverFun = nullptr |
| gets final results | |
| CallbackData | receiverData |
| caller-specific data for the handler (optional) | |
Definition at line 82 of file ipcache.cc.
|
inline |
Definition at line 85 of file ipcache.cc.
|
explicit |
Definition at line 220 of file ipcache.cc.
| IpCacheLookupForwarder::IpCacheLookupForwarder | ( | IPH * | fun, |
| void * | data | ||
| ) |
Definition at line 225 of file ipcache.cc.
|
inlineprotected |
Definition at line 110 of file ipcache.cc.
References current_time, and tvSubMsec().
Referenced by forwardLookup().
| void IpCacheLookupForwarder::finalCallback | ( | const Dns::CachedIps * | addrs, |
| const Dns::LookupDetails & | details | ||
| ) |
Definition at line 231 of file ipcache.cc.
References CbcPointer< Cbc >::clear(), debugs, Dns::CachedIps::empty(), receiverData, receiverFun, receiverObj, CbcPointer< Cbc >::set(), CbcPointer< Cbc >::valid(), CallbackData::valid(), and CallbackData::validDone().
Referenced by ipcache_nbgethostbyname_(), and ipcacheCallback().
| void IpCacheLookupForwarder::forwardHits | ( | const Dns::CachedIps & | ips | ) |
Definition at line 268 of file ipcache.cc.
References forwardIp(), Dns::CachedIps::good(), receiverObj, and CbcPointer< Cbc >::set().
Referenced by ipcache_nbgethostbyname_(), and ipcacheCallback().
| bool IpCacheLookupForwarder::forwardIp | ( | const Ip::Address & | ip | ) |
forwards an IP notification
Definition at line 252 of file ipcache.cc.
References debugs, receiverObj, CbcPointer< Cbc >::set(), and CbcPointer< Cbc >::valid().
Referenced by ipcache_entry::addGood(), and forwardHits().
| void IpCacheLookupForwarder::forwardLookup | ( | const char * | error | ) |
Definition at line 280 of file ipcache.cc.
References additionalLookupDelay(), current_time, error(), receiverObj, CbcPointer< Cbc >::set(), and CbcPointer< Cbc >::valid().
Referenced by ipcacheHandleReply().
|
inline |
Definition at line 100 of file ipcache.cc.
References current_time.
Referenced by ipcache_nbgethostbyname_().
|
inline |
Definition at line 106 of file ipcache.cc.
References current_time, and tvSubMsec().
Referenced by ipcacheHandleReply().
|
private |
Definition at line 116 of file ipcache.cc.
Referenced by finalCallback().
|
private |
Definition at line 115 of file ipcache.cc.
Referenced by finalCallback().
|
private |
Definition at line 114 of file ipcache.cc.
Referenced by finalCallback(), forwardHits(), forwardIp(), and forwardLookup().