1 | /* |
---|
2 | * Copyright (C) 1996-2015 The Squid Software Foundation and contributors |
---|
3 | * |
---|
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. |
---|
7 | */ |
---|
8 | |
---|
9 | /* DEBUG: section 77 Delay Pools */ |
---|
10 | |
---|
11 | #ifndef COMPOSITEPOOLNODE_H |
---|
12 | #define COMPOSITEPOOLNODE_H |
---|
13 | |
---|
14 | #if USE_DELAY_POOLS |
---|
15 | #include "auth/UserRequest.h" |
---|
16 | #include "CommRead.h" |
---|
17 | #include "DelayIdComposite.h" |
---|
18 | #include "DelayPools.h" |
---|
19 | #include "ip/Address.h" |
---|
20 | #include "SquidString.h" |
---|
21 | |
---|
22 | class StoreEntry; |
---|
23 | |
---|
24 | /// \ingroup DelayPoolsAPI |
---|
25 | class CompositePoolNode : public RefCountable, public Updateable |
---|
26 | { |
---|
27 | |
---|
28 | public: |
---|
29 | typedef RefCount<CompositePoolNode> Pointer; |
---|
30 | void *operator new(size_t); |
---|
31 | void operator delete (void *); |
---|
32 | virtual ~CompositePoolNode() {} |
---|
33 | |
---|
34 | virtual void stats(StoreEntry * sentry) =0; |
---|
35 | virtual void dump(StoreEntry *entry) const =0; |
---|
36 | virtual void update(int incr) =0; |
---|
37 | virtual void parse() = 0; |
---|
38 | |
---|
39 | class CompositeSelectionDetails; |
---|
40 | virtual DelayIdComposite::Pointer id(CompositeSelectionDetails &) = 0; |
---|
41 | void delayRead(DeferredRead const &); |
---|
42 | |
---|
43 | /// \ingroup DelayPoolsAPI |
---|
44 | class CompositeSelectionDetails |
---|
45 | { |
---|
46 | |
---|
47 | public: |
---|
48 | CompositeSelectionDetails() {} |
---|
49 | |
---|
50 | Ip::Address src_addr; |
---|
51 | #if USE_AUTH |
---|
52 | Auth::UserRequest::Pointer user; |
---|
53 | #endif |
---|
54 | String tag; |
---|
55 | }; |
---|
56 | |
---|
57 | protected: |
---|
58 | void kickReads(); |
---|
59 | DeferredReadManager deferredReads; |
---|
60 | }; |
---|
61 | |
---|
62 | #endif /* USE_DELAY_POOLS */ |
---|
63 | #endif /* COMPOSITEPOOLNODE_H */ |
---|
64 | |
---|