]> git.ipfire.org Git - thirdparty/squid.git/blame - src/CompositePoolNode.h
Maintenance: automate header guards 2/3 (#1655)
[thirdparty/squid.git] / src / CompositePoolNode.h
CommitLineData
b67e2c8c 1/*
b8ae064d 2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
b67e2c8c 3 *
bbc27441
AJ
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.
b67e2c8c 7 */
bbc27441
AJ
8
9/* DEBUG: section 77 Delay Pools */
10
ff9d9458
FC
11#ifndef SQUID_SRC_COMPOSITEPOOLNODE_H
12#define SQUID_SRC_COMPOSITEPOOLNODE_H
b67e2c8c 13
9a0a18de 14#if USE_DELAY_POOLS
a33a428a 15#include "auth/UserRequest.h"
a928fdfd 16#include "base/DelayedAsyncCalls.h"
582c2af2
FC
17#include "DelayIdComposite.h"
18#include "DelayPools.h"
96d89ea0 19#include "ip/Address.h"
b78b376d 20#include "sbuf/SBuf.h"
b67e2c8c 21
22class StoreEntry;
62e76326 23
63be0a78 24/// \ingroup DelayPoolsAPI
62e76326 25class CompositePoolNode : public RefCountable, public Updateable
26{
b58d2a22 27 MEMPROXY_CLASS(CompositePoolNode);
62e76326 28
b67e2c8c 29public:
30 typedef RefCount<CompositePoolNode> Pointer;
337b9aa4 31 ~CompositePoolNode() override {}
62e76326 32
b67e2c8c 33 virtual void stats(StoreEntry * sentry) =0;
34 virtual void dump(StoreEntry *entry) const =0;
337b9aa4 35 void update(int incr) override =0;
b67e2c8c 36 virtual void parse() = 0;
62e76326 37
1e5562e3 38 class CompositeSelectionDetails;
39 virtual DelayIdComposite::Pointer id(CompositeSelectionDetails &) = 0;
a928fdfd 40 void delayRead(const AsyncCallPointer &);
a46d2c0e 41
63be0a78 42 /// \ingroup DelayPoolsAPI
1e5562e3 43 class CompositeSelectionDetails
44 {
45
46 public:
b78b376d
FC
47 CompositeSelectionDetails(const Ip::Address& aSrcAddr, const SBuf &aTag) :
48 src_addr(aSrcAddr), tag(aTag)
49 {}
1e5562e3 50
b7ac5457 51 Ip::Address src_addr;
79fc6915 52#if USE_AUTH
c7baff40 53 Auth::UserRequest::Pointer user;
79fc6915 54#endif
b78b376d 55 const SBuf tag;
1e5562e3 56 };
57
a46d2c0e 58protected:
59 void kickReads();
a928fdfd 60 DelayedAsyncCalls deferredReads;
b67e2c8c 61};
62e76326 62
9a0a18de 63#endif /* USE_DELAY_POOLS */
ff9d9458 64#endif /* SQUID_SRC_COMPOSITEPOOLNODE_H */
f53969cc 65