2 * Copyright (C) 1996-2022 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 #ifndef SQUID_DELAYVECTOR_H
10 #define SQUID_DELAYVECTOR_H
14 #include "CompositePoolNode.h"
16 /// \ingroup DelayPoolsAPI
17 class DelayVector
: public CompositePoolNode
19 MEMPROXY_CLASS(DelayVector
);
22 typedef RefCount
<DelayVector
> Pointer
;
24 virtual ~DelayVector();
25 virtual void stats(StoreEntry
* sentry
);
26 virtual void dump(StoreEntry
*entry
) const;
27 virtual void update(int incr
);
30 virtual DelayIdComposite::Pointer
id(CompositeSelectionDetails
&);
31 void push_back (CompositePoolNode::Pointer
);
35 /// \ingroup DelayPoolsInternal
36 class Id
:public DelayIdComposite
38 MEMPROXY_CLASS(DelayVector::Id
);
41 Id (RefCount
<DelayVector
>,CompositeSelectionDetails
&);
43 virtual int bytesWanted (int min
, int max
) const;
44 virtual void bytesIn(int qty
);
45 virtual void delayRead(DeferredRead
const &);
48 RefCount
<DelayVector
> theVector
;
49 std::vector
<DelayIdComposite::Pointer
> ids
;
50 typedef std::vector
<DelayIdComposite::Pointer
>::iterator iterator
;
51 typedef std::vector
<DelayIdComposite::Pointer
>::const_iterator const_iterator
;
56 std::vector
<CompositePoolNode::Pointer
> pools
;
57 typedef std::vector
<CompositePoolNode::Pointer
>::iterator iterator
;
58 typedef std::vector
<CompositePoolNode::Pointer
>::const_iterator const_iterator
;
61 #endif /* USE_DELAY_POOLS */
62 #endif /* SQUID_DELAYVECTOR_H */