]> git.ipfire.org Git - thirdparty/squid.git/blame - src/DelayTagged.h
Removed squid-old.h
[thirdparty/squid.git] / src / DelayTagged.h
CommitLineData
1e5562e3 1/*
262a0e14 2 * $Id$
1e5562e3 3 *
4 * DEBUG: section 77 Delay Pools
5 * AUTHOR: Robert Collins <robertc@squid-cache.org>
6 *
7 * SQUID Web Proxy Cache http://www.squid-cache.org/
8 * ----------------------------------------------------------
9 *
10 * Squid is the result of efforts by numerous individuals from
11 * the Internet community; see the CONTRIBUTORS file for full
12 * details. Many organizations have provided support for Squid's
13 * development; see the SPONSORS file for full details. Squid is
14 * Copyrighted (C) 2001 by the Regents of the University of
15 * California; see the COPYRIGHT file for full details. Squid
16 * incorporates software developed and/or copyrighted by other
17 * sources; see the CREDITS file for full details.
18 *
19 * This program is free software; you can redistribute it and/or modify
20 * it under the terms of the GNU General Public License as published by
21 * the Free Software Foundation; either version 2 of the License, or
22 * (at your option) any later version.
26ac0430 23 *
1e5562e3 24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
26ac0430 28 *
1e5562e3 29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
32 *
33 *
34 * Copyright (c) 2003, Robert Collins <robertc@squid-cache.org>
35 */
eb8ed10d
AJ
36#ifndef DELAYTAGGED_H
37#define DELAYTAGGED_H
1e5562e3 38
9a0a18de 39#if USE_DELAY_POOLS
1e5562e3 40
3ad63615 41#include "auth/Gadgets.h"
1e5562e3 42#include "CompositePoolNode.h"
43#include "DelayIdComposite.h"
44#include "DelayBucket.h"
45#include "DelaySpec.h"
46#include "Array.h"
47#include "splay.h"
48
63be0a78 49/// \ingroup DelayPoolsAPI
1e5562e3 50class DelayTaggedBucket : public RefCountable
51{
52
53public:
54 typedef RefCount<DelayTaggedBucket> Pointer;
55 void *operator new(size_t);
56 void operator delete (void *);
1e5562e3 57
58 void stats(StoreEntry *)const;
30abd221 59 DelayTaggedBucket(String &aTag);
1e5562e3 60 ~DelayTaggedBucket();
61 DelayBucket theBucket;
30abd221 62 String tag;
1e5562e3 63};
64
63be0a78 65/// \ingroup DelayPoolsAPI
1e5562e3 66class DelayTagged : public CompositePoolNode
67{
68
69public:
70 typedef RefCount<DelayTagged> Pointer;
71 void *operator new(size_t);
72 void operator delete (void *);
1e5562e3 73 DelayTagged();
74 virtual ~DelayTagged();
75 virtual void stats(StoreEntry * sentry);
76 virtual void dump(StoreEntry *entry) const;
77 virtual void update(int incr);
78 virtual void parse();
79
80 virtual DelayIdComposite::Pointer id(CompositeSelectionDetails &);
81
82private:
83
63be0a78 84 /// \ingroup DelayPoolsInternal
85 class Id:public DelayIdComposite
1e5562e3 86 {
87
88 public:
89 void *operator new(size_t);
90 void operator delete (void *);
30abd221 91 Id (RefCount<DelayTagged>, String &);
1e5562e3 92 ~Id();
93 virtual int bytesWanted (int min, int max) const;
94 virtual void bytesIn(int qty);
288d8048 95 virtual void delayRead(DeferredRead const &);
1e5562e3 96
97 private:
75566ba2 98 RefCount<DelayTagged> theTagged;
1e5562e3 99 DelayTaggedBucket::Pointer theBucket;
100 };
101
102 friend class Id;
103
104 DelaySpec spec;
105 Splay<DelayTaggedBucket::Pointer> buckets;
106};
107
9a0a18de 108#endif /* USE_DELAY_POOLS */
1e5562e3 109#endif /* DELAYTAGGED_H */