]> git.ipfire.org Git - thirdparty/squid.git/blame - src/DelayPools.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / DelayPools.h
CommitLineData
b67e2c8c 1/*
4ac4a490 2 * Copyright (C) 1996-2017 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 *);
46 static long MemoryUsed;
47 static DelayPool *delay_data;
62e76326 48
49private:
b67e2c8c 50 static void Stats(StoreEntry *);
51 static void InitDelayData();
52 static time_t LastUpdate;
b67e2c8c 53 static unsigned short pools_;
54 static void FreeDelayData ();
c8ea3cc0 55 static std::vector<Updateable *> toUpdate;
6b7d87bb 56 static void RegisterWithCacheManager(void);
b67e2c8c 57};
62e76326 58
b67e2c8c 59#endif /* SQUID_DELAYPOOLS_H */
f53969cc 60