]> git.ipfire.org Git - thirdparty/squid.git/blame - src/DelayTagged.h
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / DelayTagged.h
CommitLineData
1e5562e3 1/*
5b74111a 2 * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
1e5562e3 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.
1e5562e3 7 */
bbc27441
AJ
8
9/* DEBUG: section 77 Delay Pools */
10
eb8ed10d
AJ
11#ifndef DELAYTAGGED_H
12#define DELAYTAGGED_H
1e5562e3 13
9a0a18de 14#if USE_DELAY_POOLS
1e5562e3 15
3ad63615 16#include "auth/Gadgets.h"
1e5562e3 17#include "CompositePoolNode.h"
1e5562e3 18#include "DelayBucket.h"
602d9612 19#include "DelayIdComposite.h"
1e5562e3 20#include "DelaySpec.h"
1e5562e3 21#include "splay.h"
22
63be0a78 23/// \ingroup DelayPoolsAPI
1e5562e3 24class DelayTaggedBucket : public RefCountable
25{
b58d2a22 26 MEMPROXY_CLASS(DelayTaggedBucket);
1e5562e3 27
28public:
29 typedef RefCount<DelayTaggedBucket> Pointer;
1e5562e3 30
31 void stats(StoreEntry *)const;
30abd221 32 DelayTaggedBucket(String &aTag);
1e5562e3 33 ~DelayTaggedBucket();
34 DelayBucket theBucket;
30abd221 35 String tag;
1e5562e3 36};
37
63be0a78 38/// \ingroup DelayPoolsAPI
1e5562e3 39class DelayTagged : public CompositePoolNode
40{
b58d2a22 41 MEMPROXY_CLASS(DelayTagged);
1e5562e3 42
43public:
44 typedef RefCount<DelayTagged> Pointer;
b58d2a22 45
1e5562e3 46 DelayTagged();
47 virtual ~DelayTagged();
48 virtual void stats(StoreEntry * sentry);
49 virtual void dump(StoreEntry *entry) const;
50 virtual void update(int incr);
51 virtual void parse();
52
53 virtual DelayIdComposite::Pointer id(CompositeSelectionDetails &);
54
55private:
56
63be0a78 57 /// \ingroup DelayPoolsInternal
58 class Id:public DelayIdComposite
1e5562e3 59 {
b58d2a22 60 MEMPROXY_CLASS(DelayTagged::Id);
1e5562e3 61
62 public:
30abd221 63 Id (RefCount<DelayTagged>, String &);
1e5562e3 64 ~Id();
65 virtual int bytesWanted (int min, int max) const;
66 virtual void bytesIn(int qty);
288d8048 67 virtual void delayRead(DeferredRead const &);
1e5562e3 68
69 private:
75566ba2 70 RefCount<DelayTagged> theTagged;
1e5562e3 71 DelayTaggedBucket::Pointer theBucket;
72 };
73
74 friend class Id;
75
76 DelaySpec spec;
77 Splay<DelayTaggedBucket::Pointer> buckets;
78};
79
9a0a18de 80#endif /* USE_DELAY_POOLS */
1e5562e3 81#endif /* DELAYTAGGED_H */
f53969cc 82