|
Squid Web Cache master
|
Sends and handles collapsed forwarding notifications. More...
#include <CollapsedForwarding.h>
Static Public Member Functions | |
| static void | Init () |
| open shared memory segment | |
| static void | Broadcast (const StoreEntry &e, const bool includingThisWorker=false) |
| notify other workers about changes in entry state (e.g., new data) | |
| static void | Broadcast (const sfileno index, const bool includingThisWorker) |
| static void | Notify (const int workerId) |
| kick worker with empty IPC queue | |
| static void | HandleNewData (const char *const when) |
| handle new data messages in IPC queue | |
| static void | HandleNotification (const Ipc::TypedMsgHdr &msg) |
| handle queue push notifications from worker or disker | |
| static void | StatQueue (std::ostream &) |
| prints IPC message queue state; suitable for cache manager reports | |
Private Types | |
| typedef Ipc::MultiQueue | Queue |
Static Private Member Functions | |
| static void | HandleNewDataAtStart () |
Static Private Attributes | |
| static std::unique_ptr< Queue > | queue |
| IPC queue. | |
Definition at line 23 of file CollapsedForwarding.h.
|
private |
Definition at line 51 of file CollapsedForwarding.h.
|
static |
notify other workers about state changes in Transient entry at the given xitTable.index use Broadcast(StoreEntry) variant if you have a StoreEntry object
Definition at line 83 of file CollapsedForwarding.cc.
References Config, DBG_IMPORTANT, debugs, KidIdentifier, Notify(), queue, CollapsedForwardingMsg::sender, SquidConfig::workers, and CollapsedForwardingMsg::xitIndex.
|
static |
Definition at line 70 of file CollapsedForwarding.cc.
References Broadcast(), debugs, StoreEntry::hasTransients(), MemObject::XitTable::index, StoreEntry::mem_obj, Store::Root(), Store::Controller::transientReaders(), and MemObject::xitTable.
Referenced by Broadcast(), Transients::completeWriting(), MemStore::completeWriting(), Transients::disconnect(), MemStore::disconnect(), Rock::SwapDir::disconnect(), Rock::SwapDir::evictCached(), MemStore::evictCached(), Transients::evictCached(), Transients::evictIfFound(), Rock::IoState::finishedWriting(), MemStore::write(), Rock::SwapDir::writeCompleted(), and Rock::SwapDir::writeError().
|
static |
Definition at line 121 of file CollapsedForwarding.cc.
References assert, DBG_IMPORTANT, debugs, queue, Store::Root(), CollapsedForwardingMsg::sender, SQUID_MAXFD, Store::Controller::syncCollapsed(), and CollapsedForwardingMsg::xitIndex.
Referenced by HandleNewDataAtStart(), and HandleNotification().
|
staticprivate |
Handle queued IPC messages for the first time in this process lifetime, when the queue may be reflecting the state of our killed predecessor.
Definition at line 157 of file CollapsedForwarding.cc.
References HandleNewData(), and queue.
Referenced by Init().
|
static |
Definition at line 145 of file CollapsedForwarding.cc.
References assert, debugs, Ipc::TypedMsgHdr::getInt(), HandleNewData(), and queue.
Referenced by Ipc::Strand::receive().
|
static |
Definition at line 58 of file CollapsedForwarding.cc.
References asyncCall(), HandleNewDataAtStart(), IamWorkerProcess(), KidIdentifier, Must, queue, ScheduleCallHere, ShmLabel, and UsingSmp().
Referenced by CollapsedForwardingRr::open().
|
static |
Definition at line 109 of file CollapsedForwarding.cc.
References debugs, KidIdentifier, Ipc::Port::MakeAddr(), Ipc::mtCollapsedForwardingNotification, Ipc::TypedMsgHdr::putInt(), Ipc::SendMessage(), Ipc::TypedMsgHdr::setType(), and Ipc::strandAddrLabel.
Referenced by Broadcast().
|
static |
Definition at line 165 of file CollapsedForwarding.cc.
References queue.
Referenced by StatQueues().
|
staticprivate |
Definition at line 52 of file CollapsedForwarding.h.
Referenced by Broadcast(), HandleNewData(), HandleNewDataAtStart(), HandleNotification(), Init(), and StatQueue().