CollapsedForwarding.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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 
17 #include <memory>
18 
19 class StoreEntry;
20 
23 {
24 public:
26  static void Init();
27 
29  static void Broadcast(const StoreEntry &e);
30 
32  static void Notify(const int workerId);
33 
35  static void HandleNewData(const char *const when);
36 
38  static void HandleNotification(const Ipc::TypedMsgHdr &msg);
39 
40 private:
42  static std::unique_ptr<Queue> queue;
43 };
44 
45 #endif /* SQUID_COLLAPSED_FORWARDING_H */
46 
static void Notify(const int workerId)
kick worker with empty IPC queue
static void Broadcast(const StoreEntry &e)
notify other workers about changes in entry state (e.g., new data)
static void HandleNotification(const Ipc::TypedMsgHdr &msg)
handle queue push notifications from worker or disker
Sends and handles collapsed forwarding notifications.
static void HandleNewData(const char *const when)
handle new data messages in IPC queue
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:31
static void Init()
open shared memory segment
static std::unique_ptr< Queue > queue
IPC queue.

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors