CollapsedForwarding.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9/* DEBUG: section 17 Request Forwarding */
10
11#ifndef SQUID_COLLAPSED_FORWARDING_H
12#define SQUID_COLLAPSED_FORWARDING_H
13
14#include "ipc/forward.h"
15#include "ipc/Queue.h"
16#include "store/forward.h"
17
18#include <memory>
19
20class StoreEntry;
21
24{
25public:
27 static void Init();
28
30 static void Broadcast(const StoreEntry &e, const bool includingThisWorker = false);
31
34 static void Broadcast(const sfileno index, const bool includingThisWorker);
35
37 static void Notify(const int workerId);
38
40 static void HandleNewData(const char *const when);
41
43 static void HandleNotification(const Ipc::TypedMsgHdr &msg);
44
46 static void StatQueue(std::ostream &);
47
48private:
49 static void HandleNewDataAtStart();
50
52 static std::unique_ptr<Queue> queue;
53};
54
55#endif /* SQUID_COLLAPSED_FORWARDING_H */
56
Sends and handles collapsed forwarding notifications.
static void Notify(const int workerId)
kick worker with empty IPC queue
static void StatQueue(std::ostream &)
prints IPC message queue state; suitable for cache manager reports
static std::unique_ptr< Queue > queue
IPC queue.
static void Broadcast(const StoreEntry &e, const bool includingThisWorker=false)
notify other workers about changes in entry state (e.g., new data)
static void HandleNewData(const char *const when)
handle new data messages in IPC queue
static void Init()
open shared memory segment
static void HandleNotification(const Ipc::TypedMsgHdr &msg)
handle queue push notifications from worker or disker
static void HandleNewDataAtStart()
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:35
signed_int32_t sfileno
Definition: forward.h:22

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors