/* * Copyright (C) 1996-2018 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 { public: typedef RefCount Pointer; void *operator new(size_t); void operator delete (void *); 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 { public: void *operator new(size_t); void operator delete (void *); 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 */