Sends and handles collapsed forwarding notifications. More...

#include <CollapsedForwarding.h>

Collaboration diagram for CollapsedForwarding:

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< Queuequeue
 IPC queue. More...
 

Detailed Description

Definition at line 23 of file CollapsedForwarding.h.

Member Typedef Documentation

◆ Queue

Definition at line 51 of file CollapsedForwarding.h.

Member Function Documentation

◆ Broadcast() [1/2]

void CollapsedForwarding::Broadcast ( const sfileno  index,
const bool  includingThisWorker 
)
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]

◆ HandleNewData()

void CollapsedForwarding::HandleNewData ( const char *const  when)
static

◆ HandleNewDataAtStart()

void CollapsedForwarding::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()

void CollapsedForwarding::HandleNotification ( const Ipc::TypedMsgHdr msg)
static

Definition at line 145 of file CollapsedForwarding.cc.

References assert, debugs, Ipc::TypedMsgHdr::getInt(), HandleNewData(), and queue.

Referenced by Ipc::Strand::receive().

◆ Init()

void CollapsedForwarding::Init ( )
static

◆ Notify()

void CollapsedForwarding::Notify ( const int  workerId)
static

◆ StatQueue()

void CollapsedForwarding::StatQueue ( std::ostream &  os)
static

Definition at line 165 of file CollapsedForwarding.cc.

References queue.

Referenced by StatQueues().

Member Data Documentation

◆ queue

std::unique_ptr< CollapsedForwarding::Queue > CollapsedForwarding::queue
staticprivate

The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors