]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/CollapsedForwarding.h
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
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.
9 /* DEBUG: section 17 Request Forwarding */
11 #ifndef SQUID_COLLAPSED_FORWARDING_H
12 #define SQUID_COLLAPSED_FORWARDING_H
14 #include "ipc/forward.h"
15 #include "ipc/Queue.h"
22 /// Sends and handles collapsed forwarding notifications.
23 class CollapsedForwarding
26 /// open shared memory segment
29 /// notify other workers about changes in entry state (e.g., new data)
30 static void Broadcast(const StoreEntry
&e
);
32 /// kick worker with empty IPC queue
33 static void Notify(const int workerId
);
35 /// handle new data messages in IPC queue
36 static void HandleNewData(const char *const when
);
38 /// handle queue push notifications from worker or disker
39 static void HandleNotification(const Ipc::TypedMsgHdr
&msg
);
42 typedef Ipc::MultiQueue Queue
;
43 static std::auto_ptr
<Queue
> queue
; ///< IPC queue
46 #endif /* SQUID_COLLAPSED_FORWARDING_H */