]> git.ipfire.org Git - thirdparty/squid.git/blame - src/DelayPools.h
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / DelayPools.h
CommitLineData
b67e2c8c 1/*
5b74111a 2 * Copyright (C) 1996-2018 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 8
b67e2c8c 9#ifndef SQUID_DELAYPOOLS_H
10#define SQUID_DELAYPOOLS_H
11
c8ea3cc0 12#include <vector>
08f774de
AJ
13
14class DelayPool;
15class Updateable;
16class StoreEntry;
17
63be0a78 18/**
19 \defgroup DelayPoolsAPI Delay Pools API
20 \ingroup Components
21 */
62ee09ca 22
63be0a78 23/// \ingroup DelayPoolsAPI
62e76326 24class Updateable
25{
26
27public:
26ac0430 28 virtual ~Updateable() {}
62e76326 29
b67e2c8c 30 virtual void update(int) = 0;
31};
32
63be0a78 33/// \ingroup DelayPoolsAPI
62e76326 34class DelayPools
35{
36
37public:
b67e2c8c 38 static void Init();
39 static void Update(void *);
b67e2c8c 40 static unsigned short pools();
f45dd259 41 static void pools(unsigned short pools);
b67e2c8c 42 static void FreePools();
43 static unsigned char *DelayClasses();
44 static void registerForUpdates(Updateable *);
45 static void deregisterForUpdates (Updateable *);
b67e2c8c 46 static DelayPool *delay_data;
62e76326 47
48private:
b67e2c8c 49 static void Stats(StoreEntry *);
50 static void InitDelayData();
51 static time_t LastUpdate;
b67e2c8c 52 static unsigned short pools_;
53 static void FreeDelayData ();
c8ea3cc0 54 static std::vector<Updateable *> toUpdate;
6b7d87bb 55 static void RegisterWithCacheManager(void);
b67e2c8c 56};
62e76326 57
b67e2c8c 58#endif /* SQUID_DELAYPOOLS_H */
f53969cc 59