2 * Copyright (C) 1996-2017 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
27 MEMPROXY_CLASS(DelayUserBucket
);
30 typedef RefCount
<DelayUserBucket
> Pointer
;
32 void stats(StoreEntry
*)const;
33 DelayUserBucket(Auth::User::Pointer
);
35 DelayBucket theBucket
;
36 Auth::User::Pointer authUser
;
39 /// \ingroup DelayPoolsAPI
40 class DelayUser
: public CompositePoolNode
42 MEMPROXY_CLASS(DelayUser
);
45 typedef RefCount
<DelayUser
> Pointer
;
48 virtual void stats(StoreEntry
* sentry
);
49 virtual void dump(StoreEntry
*entry
) const;
50 virtual void update(int incr
);
53 virtual DelayIdComposite::Pointer
id(CompositeSelectionDetails
&);
57 /// \ingroup DelayPoolsInternal
58 class Id
:public DelayIdComposite
60 MEMPROXY_CLASS(DelayUser::Id
);
63 Id(RefCount
<DelayUser
>, Auth::User::Pointer
);
65 virtual int bytesWanted (int min
, int max
) const;
66 virtual void bytesIn(int qty
);
69 RefCount
<DelayUser
> theUser
;
70 DelayUserBucket::Pointer theBucket
;
76 Splay
<DelayUserBucket::Pointer
> buckets
;
79 #endif /* USE_DELAY_POOLS && USE_AUTH */
80 #endif /* DELAYUSER_H */