Sends and handles collapsed forwarding notifications. More...
#include <CollapsedForwarding.h>
Static Public Member Functions | |
static void | Init () |
open shared memory segment More... | |
static void | Broadcast (const StoreEntry &e, const bool includingThisWorker=false) |
notify other workers about changes in entry state (e.g., new data) More... | |
static void | Broadcast (const sfileno index, const bool includingThisWorker) |
static void | Notify (const int workerId) |
kick worker with empty IPC queue More... | |
static void | HandleNewData (const char *const when) |
handle new data messages in IPC queue More... | |
static void | HandleNotification (const Ipc::TypedMsgHdr &msg) |
handle queue push notifications from worker or disker More... | |
static void | StatQueue (std::ostream &) |
prints IPC message queue state; suitable for cache manager reports More... | |
Private Types | |
typedef Ipc::MultiQueue | Queue |
Static Private Member Functions | |
static void | HandleNewDataAtStart () |
Static Private Attributes | |
static std::unique_ptr< Queue > | queue |
IPC queue. More... | |
Detailed Description
Definition at line 23 of file CollapsedForwarding.h.
Member Typedef Documentation
◆ Queue
|
private |
Definition at line 51 of file CollapsedForwarding.h.
Member Function Documentation
◆ Broadcast() [1/2]
|
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.
◆ Broadcast() [2/2]
|
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().
◆ HandleNewData()
|
static |
Definition at line 121 of file CollapsedForwarding.cc.
References assert, DBG_IMPORTANT, debugs, queue, Store::Root(), CollapsedForwardingMsg::sender, Store::Controller::syncCollapsed(), and CollapsedForwardingMsg::xitIndex.
Referenced by HandleNewDataAtStart(), and HandleNotification().
◆ HandleNewDataAtStart()
|
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.
- See also
- IpcIoFile::HandleMessagesAtStart() – duplicates this logic
Definition at line 157 of file CollapsedForwarding.cc.
References HandleNewData(), and queue.
Referenced by Init().
◆ HandleNotification()
|
static |
Definition at line 145 of file CollapsedForwarding.cc.
References assert, debugs, Ipc::TypedMsgHdr::getInt(), HandleNewData(), and queue.
Referenced by Ipc::Strand::receive().
◆ Init()
|
static |
Definition at line 58 of file CollapsedForwarding.cc.
References asyncCall(), HandleNewDataAtStart(), IamWorkerProcess(), KidIdentifier, Must, queue, ScheduleCallHere, ShmLabel, and UsingSmp().
Referenced by CollapsedForwardingRr::open().
◆ Notify()
|
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().
◆ StatQueue()
|
static |
Definition at line 165 of file CollapsedForwarding.cc.
References queue.
Referenced by StatQueues().
Member Data Documentation
◆ queue
|
staticprivate |
Definition at line 52 of file CollapsedForwarding.h.
Referenced by Broadcast(), HandleNewData(), HandleNewDataAtStart(), HandleNotification(), Init(), and StatQueue().
The documentation for this class was generated from the following files: