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