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 */
14 #if USE_DELAY_POOLS && USE_AUTH
16 #include "auth/Gadgets.h"
17 #include "auth/User.h"
18 #include "CompositePoolNode.h"
19 #include "DelayBucket.h"
20 #include "DelayIdComposite.h"
21 #include "DelaySpec.h"
24 /// \ingroup DelayPoolsAPI
25 class DelayUserBucket
: public RefCountable
29 typedef RefCount
<DelayUserBucket
> Pointer
;
30 void *operator new(size_t);
31 void operator delete (void *);
33 void stats(StoreEntry
*)const;
34 DelayUserBucket(Auth::User::Pointer
);
36 DelayBucket theBucket
;
37 Auth::User::Pointer authUser
;
40 /// \ingroup DelayPoolsAPI
41 class DelayUser
: public CompositePoolNode
45 typedef RefCount
<DelayUser
> Pointer
;
46 void *operator new(size_t);
47 void operator delete (void *);
50 virtual void stats(StoreEntry
* sentry
);
51 virtual void dump(StoreEntry
*entry
) const;
52 virtual void update(int incr
);
55 virtual DelayIdComposite::Pointer
id(CompositeSelectionDetails
&);
59 /// \ingroup DelayPoolsInternal
60 class Id
:public DelayIdComposite
64 void *operator new(size_t);
65 void operator delete (void *);
66 Id(RefCount
<DelayUser
>, Auth::User::Pointer
);
68 virtual int bytesWanted (int min
, int max
) const;
69 virtual void bytesIn(int qty
);
72 RefCount
<DelayUser
> theUser
;
73 DelayUserBucket::Pointer theBucket
;
79 Splay
<DelayUserBucket::Pointer
> buckets
;
82 #endif /* USE_DELAY_POOLS && USE_AUTH */
83 #endif /* DELAYUSER_H */