/* * Copyright (C) 1996-2023 The Squid Software Foundation and contributors * * Squid software is distributed under GPLv2+ license and includes * contributions from numerous individuals and organizations. * Please see the COPYING and CONTRIBUTORS files for details. */ #ifndef SQUID_DELAYVECTOR_H #define SQUID_DELAYVECTOR_H #if USE_DELAY_POOLS #include "CompositePoolNode.h" /// \ingroup DelayPoolsAPI class DelayVector : public CompositePoolNode { MEMPROXY_CLASS(DelayVector); public: typedef RefCount Pointer; DelayVector(); virtual ~DelayVector(); virtual void stats(StoreEntry * sentry); virtual void dump(StoreEntry *entry) const; virtual void update(int incr); virtual void parse(); virtual DelayIdComposite::Pointer id(CompositeSelectionDetails &); void push_back (CompositePoolNode::Pointer); private: /// \ingroup DelayPoolsInternal class Id:public DelayIdComposite { MEMPROXY_CLASS(DelayVector::Id); public: Id (RefCount,CompositeSelectionDetails &); ~Id(); virtual int bytesWanted (int min, int max) const; virtual void bytesIn(int qty); virtual void delayRead(DeferredRead const &); private: RefCount theVector; std::vector ids; typedef std::vector::iterator iterator; typedef std::vector::const_iterator const_iterator; }; friend class Id; std::vector pools; typedef std::vector::iterator iterator; typedef std::vector::const_iterator const_iterator; }; #endif /* USE_DELAY_POOLS */ #endif /* SQUID_DELAYVECTOR_H */