|
Squid Web Cache master
|
#include "squid.h"#include "base/RunnersRegistry.h"#include "CachePeer.h"#include "CachePeers.h"#include "HttpRequest.h"#include "mgr/Registration.h"#include "neighbors.h"#include "peer_sourcehash.h"#include "PeerSelectState.h"#include "SquidConfig.h"#include "Store.h"#include <cmath>Go to the source code of this file.
Classes | |
| class | PeerSourceHashRr |
| reacts to RegisteredRunner events relevant to this module More... | |
Macros | |
| #define | ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) |
Functions | |
| static auto & | SourceHashPeers () |
| sourcehash peers ordered by their sourcehash weight | |
| static void | peerSourceHashRegisterWithCacheManager (void) |
| static int | peerSortWeight (const void *a, const void *b) |
| static void | peerSourceHashInit (void) |
| DefineRunnerRegistrator (PeerSourceHashRr) | |
| CachePeer * | peerSourceHashSelectParent (PeerSelector *ps) |
| static void | peerSourceHashCachemgr (StoreEntry *sentry) |
Variables | |
| static OBJH | peerSourceHashCachemgr |
| #define ROTATE_LEFT | ( | x, | |
| n | |||
| ) | (((x) << (n)) | ((x) >> (32-(n)))) |
Definition at line 25 of file peer_sourcehash.cc.
| DefineRunnerRegistrator | ( | PeerSourceHashRr | ) |
|
static |
Definition at line 39 of file peer_sourcehash.cc.
References CachePeer::weight.
Referenced by peerSourceHashInit().
|
static |
Definition at line 200 of file peer_sourcehash.cc.
References SourceHashPeers(), and storeAppendPrintf().
|
static |
Definition at line 47 of file peer_sourcehash.cc.
References assert, CurrentCachePeers(), double, int, PEER_PARENT, peerSortWeight(), peerSourceHashRegisterWithCacheManager(), ROTATE_LEFT, and SourceHashPeers().
Referenced by PeerSourceHashRr::syncConfig(), and PeerSourceHashRr::useConfig().
|
static |
Definition at line 143 of file peer_sourcehash.cc.
References peerSourceHashCachemgr, and Mgr::RegisterAction().
Referenced by peerSourceHashInit().
| CachePeer * peerSourceHashSelectParent | ( | PeerSelector * | ps | ) |
Definition at line 150 of file peer_sourcehash.cc.
References assert, HttpRequest::client_addr, debugs, MAX_IPSTRLEN, peerHTTPOkay(), PeerSelector::request, ROTATE_LEFT, SourceHashPeers(), and Ip::Address::toStr().
Referenced by PeerSelector::selectSomeParent().
|
static |
Definition at line 29 of file peer_sourcehash.cc.
Referenced by peerSourceHashCachemgr(), peerSourceHashInit(), and peerSourceHashSelectParent().
|
static |
Definition at line 35 of file peer_sourcehash.cc.
Referenced by peerSourceHashRegisterWithCacheManager().