2 * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
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.
9 /* DEBUG: section 77 Delay Pools */
16 #include "auth/Gadgets.h"
17 #include "CompositePoolNode.h"
18 #include "DelayBucket.h"
19 #include "DelayIdComposite.h"
20 #include "DelaySpec.h"
23 /// \ingroup DelayPoolsAPI
24 class DelayTaggedBucket
: public RefCountable
28 typedef RefCount
<DelayTaggedBucket
> Pointer
;
29 void *operator new(size_t);
30 void operator delete (void *);
32 void stats(StoreEntry
*)const;
33 DelayTaggedBucket(String
&aTag
);
35 DelayBucket theBucket
;
39 /// \ingroup DelayPoolsAPI
40 class DelayTagged
: public CompositePoolNode
44 typedef RefCount
<DelayTagged
> Pointer
;
45 void *operator new(size_t);
46 void operator delete (void *);
48 virtual ~DelayTagged();
49 virtual void stats(StoreEntry
* sentry
);
50 virtual void dump(StoreEntry
*entry
) const;
51 virtual void update(int incr
);
54 virtual DelayIdComposite::Pointer
id(CompositeSelectionDetails
&);
58 /// \ingroup DelayPoolsInternal
59 class Id
:public DelayIdComposite
63 void *operator new(size_t);
64 void operator delete (void *);
65 Id (RefCount
<DelayTagged
>, String
&);
67 virtual int bytesWanted (int min
, int max
) const;
68 virtual void bytesIn(int qty
);
69 virtual void delayRead(DeferredRead
const &);
72 RefCount
<DelayTagged
> theTagged
;
73 DelayTaggedBucket::Pointer theBucket
;
79 Splay
<DelayTaggedBucket::Pointer
> buckets
;
82 #endif /* USE_DELAY_POOLS */
83 #endif /* DELAYTAGGED_H */