--------------------- PatchSet 6020 Date: 2007/10/27 12:23:00 Author: amosjeffries Branch: docs Tag: (none) Log: Link most DelayPools code into module Members: src/CommonPool.h:1.3->1.3.28.1 src/CompositePoolNode.h:1.6->1.6.20.1 src/DelayBucket.cc:1.5->1.5.28.1 src/DelayBucket.h:1.2->1.2.32.1 src/DelayConfig.h:1.3->1.3.14.1 src/DelayId.h:1.3->1.3.28.1 src/DelayPool.cc:1.7->1.7.4.1 src/DelayPool.h:1.2->1.2.32.1 src/DelayPools.h:1.4->1.4.14.1 src/DelaySpec.h:1.2->1.2.32.1 src/DelayTagged.h:1.4->1.4.30.1 src/DelayUser.h:1.7->1.7.28.1 src/DelayVector.h:1.9->1.9.28.1 src/delay_pools.cc:1.21->1.21.2.1 Index: squid3/src/CommonPool.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/CommonPool.h,v retrieving revision 1.3 retrieving revision 1.3.28.1 diff -u -r1.3 -r1.3.28.1 --- squid3/src/CommonPool.h 5 Aug 2003 02:12:48 -0000 1.3 +++ squid3/src/CommonPool.h 27 Oct 2007 12:23:00 -0000 1.3.28.1 @@ -1,6 +1,5 @@ - /* - * $Id: CommonPool.h,v 1.3 2003/08/05 02:12:48 squidadm Exp $ + * $Id: CommonPool.h,v 1.3.28.1 2007/10/27 12:23:00 amosjeffries Exp $ * * DEBUG: section 77 Delay Pools * AUTHOR: Robert Collins @@ -46,11 +45,13 @@ #include "SquidString.h" #include "CompositePoolNode.h" -/* Next steps: make this a composite, and TypeLabel a composite method. +/* + \ingroup DelayPoolsAPI + * + \todo Next steps: make this a composite, and TypeLabel a composite method. * Then we have a legacy composite which returns class 1/2/3, and new * composites which return a descriptor of some sort. */ - class CommonPool { Index: squid3/src/CompositePoolNode.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/CompositePoolNode.h,v retrieving revision 1.6 retrieving revision 1.6.20.1 diff -u -r1.6 -r1.6.20.1 --- squid3/src/CompositePoolNode.h 19 Apr 2005 02:14:46 -0000 1.6 +++ squid3/src/CompositePoolNode.h 27 Oct 2007 12:23:00 -0000 1.6.20.1 @@ -1,6 +1,5 @@ - /* - * $Id: CompositePoolNode.h,v 1.6 2005/04/19 02:14:46 squidadm Exp $ + * $Id: CompositePoolNode.h,v 1.6.20.1 2007/10/27 12:23:00 amosjeffries Exp $ * * DEBUG: section 77 Delay Pools * AUTHOR: Robert Collins @@ -52,6 +51,7 @@ class AuthUserRequest; +/// \ingroup DelayPoolsAPI class CompositePoolNode : public RefCountable, public Updateable { @@ -70,6 +70,7 @@ virtual DelayIdComposite::Pointer id(CompositeSelectionDetails &) = 0; void delayRead(DeferredRead const &); + /// \ingroup DelayPoolsAPI class CompositeSelectionDetails { Index: squid3/src/DelayBucket.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/DelayBucket.cc,v retrieving revision 1.5 retrieving revision 1.5.28.1 diff -u -r1.5 -r1.5.28.1 --- squid3/src/DelayBucket.cc 11 Mar 2003 03:15:58 -0000 1.5 +++ squid3/src/DelayBucket.cc 27 Oct 2007 12:23:00 -0000 1.5.28.1 @@ -1,6 +1,5 @@ - /* - * $Id: DelayBucket.cc,v 1.5 2003/03/11 03:15:58 squidadm Exp $ + * $Id: DelayBucket.cc,v 1.5.28.1 2007/10/27 12:23:00 amosjeffries Exp $ * * DEBUG: section 77 Delay Pools * AUTHOR: Robert Collins @@ -44,7 +43,8 @@ #include "DelayBucket.h" #include "DelaySpec.h" #include "Store.h" -/* + +#if DEAD_CODE // ? #include "DelayPools.h" #include "StoreClient.h" #include "MemObject.h" @@ -60,7 +60,7 @@ #include "DelayPool.h" #include "DelayVector.h" #include "NullDelayId.h" -*/ +#endif void DelayBucket::stats(StoreEntry *entry)const @@ -69,7 +69,7 @@ } void -DelayBucket::update (DelaySpec const &rate, int incr) +DelayBucket::update(DelaySpec const &rate, int incr) { if (rate.restore_bps != -1 && (level() += rate.restore_bps * incr) > rate.max_bytes) @@ -77,7 +77,7 @@ } int -DelayBucket::bytesWanted (int minimum, int maximum) const +DelayBucket::bytesWanted(int minimum, int maximum) const { int result = max(minimum, min(maximum, level())); return result; @@ -90,11 +90,10 @@ } void -DelayBucket::init (DelaySpec const &rate) +DelayBucket::init(DelaySpec const &rate) { level() = (int) (((double)rate.max_bytes * Config.Delay.initial) / 100); } #endif - Index: squid3/src/DelayBucket.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/DelayBucket.h,v retrieving revision 1.2 retrieving revision 1.2.32.1 diff -u -r1.2 -r1.2.32.1 --- squid3/src/DelayBucket.h 22 Feb 2003 03:14:29 -0000 1.2 +++ squid3/src/DelayBucket.h 27 Oct 2007 12:23:00 -0000 1.2.32.1 @@ -1,6 +1,5 @@ - /* - * $Id: DelayBucket.h,v 1.2 2003/02/22 03:14:29 squidadm Exp $ + * $Id: DelayBucket.h,v 1.2.32.1 2007/10/27 12:23:00 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -39,6 +38,7 @@ class DelaySpec; /* don't use remote storage for these */ +/// \ingroup DelayPoolsAPI class DelayBucket { Index: squid3/src/DelayConfig.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/DelayConfig.h,v retrieving revision 1.3 retrieving revision 1.3.14.1 diff -u -r1.3 -r1.3.14.1 --- squid3/src/DelayConfig.h 25 Apr 2006 15:17:07 -0000 1.3 +++ squid3/src/DelayConfig.h 27 Oct 2007 12:23:00 -0000 1.3.14.1 @@ -1,6 +1,5 @@ - /* - * $Id: DelayConfig.h,v 1.3 2006/04/25 15:17:07 squidadm Exp $ + * $Id: DelayConfig.h,v 1.3.14.1 2007/10/27 12:23:00 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -38,6 +37,7 @@ class ConfigParser; +/// \ingroup DelayPoolsAPI class DelayConfig { Index: squid3/src/DelayId.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/DelayId.h,v retrieving revision 1.3 retrieving revision 1.3.28.1 diff -u -r1.3 -r1.3.28.1 --- squid3/src/DelayId.h 4 Mar 2003 03:14:38 -0000 1.3 +++ squid3/src/DelayId.h 27 Oct 2007 12:23:00 -0000 1.3.28.1 @@ -1,6 +1,5 @@ - /* - * $Id: DelayId.h,v 1.3 2003/03/04 03:14:38 squidadm Exp $ + * $Id: DelayId.h,v 1.3.28.1 2007/10/27 12:23:00 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -39,6 +38,7 @@ class ClientHttpRequest; #include "DelayIdComposite.h" +/// \ingroup DelayPoolsAPI class DelayId { Index: squid3/src/DelayPool.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/DelayPool.cc,v retrieving revision 1.7 retrieving revision 1.7.4.1 diff -u -r1.7 -r1.7.4.1 --- squid3/src/DelayPool.cc 23 Apr 2007 06:52:06 -0000 1.7 +++ squid3/src/DelayPool.cc 27 Oct 2007 12:23:00 -0000 1.7.4.1 @@ -1,6 +1,5 @@ - /* - * $Id: DelayPool.cc,v 1.7 2007/04/23 06:52:06 squidadm Exp $ + * $Id: DelayPool.cc,v 1.7.4.1 2007/10/27 12:23:00 amosjeffries Exp $ * * DEBUG: section 77 Delay Pools * AUTHOR: Robert Collins @@ -62,12 +61,12 @@ void DelayPool::parse() { - assert (theComposite() != NULL); + assert(theComposite() != NULL); theComposite()->parse(); } void -DelayPool::dump (StoreEntry *entry, unsigned int i) const +DelayPool::dump(StoreEntry *entry, unsigned int i) const { if (theComposite() == NULL) return; @@ -103,7 +102,7 @@ pool = NULL; } -/* XXX create DelayIdComposite.cc */ +/** \todo XXX create DelayIdComposite.cc */ void CompositePoolNode::delayRead(DeferredRead const &aRead) { @@ -115,7 +114,8 @@ void CompositePoolNode::kickReads() { - /* we only start one, because delay pools may have **many** attached connections, + /** + * we only start one, because delay pools may have **many** attached connections, * and kicking them all off would be chaotic. * This may need to be reviewed. */ Index: squid3/src/DelayPool.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/DelayPool.h,v retrieving revision 1.2 retrieving revision 1.2.32.1 diff -u -r1.2 -r1.2.32.1 --- squid3/src/DelayPool.h 22 Feb 2003 03:14:29 -0000 1.2 +++ squid3/src/DelayPool.h 27 Oct 2007 12:23:00 -0000 1.2.32.1 @@ -1,6 +1,6 @@ /* - * $Id: DelayPool.h,v 1.2 2003/02/22 03:14:29 squidadm Exp $ + * $Id: DelayPool.h,v 1.2.32.1 2007/10/27 12:23:00 amosjeffries Exp $ * * DEBUG: section 77 Delay Pools * AUTHOR: Robert Collins @@ -52,6 +52,7 @@ class acl_access; +/// \ingroup DelayPoolsAPI class DelayPool { Index: squid3/src/DelayPools.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/DelayPools.h,v retrieving revision 1.4 retrieving revision 1.4.14.1 diff -u -r1.4 -r1.4.14.1 --- squid3/src/DelayPools.h 29 May 2006 00:50:18 -0000 1.4 +++ squid3/src/DelayPools.h 27 Oct 2007 12:23:00 -0000 1.4.14.1 @@ -1,6 +1,5 @@ - /* - * $Id: DelayPools.h,v 1.4 2006/05/29 00:50:18 squidadm Exp $ + * $Id: DelayPools.h,v 1.4.14.1 2007/10/27 12:23:00 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -36,12 +35,17 @@ #ifndef SQUID_DELAYPOOLS_H #define SQUID_DELAYPOOLS_H -/* forward decls */ +/** + \defgroup DelayPoolsAPI Delay Pools API + \ingroup Components + */ +/* forward decls */ class CacheManager; #include "Array.h" +/// \ingroup DelayPoolsAPI class Updateable { @@ -53,6 +57,7 @@ class DelayPool; +/// \ingroup DelayPoolsAPI class DelayPools { Index: squid3/src/DelaySpec.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/DelaySpec.h,v retrieving revision 1.2 retrieving revision 1.2.32.1 diff -u -r1.2 -r1.2.32.1 --- squid3/src/DelaySpec.h 22 Feb 2003 03:14:29 -0000 1.2 +++ squid3/src/DelaySpec.h 27 Oct 2007 12:23:00 -0000 1.2.32.1 @@ -1,6 +1,5 @@ - /* - * $Id: DelaySpec.h,v 1.2 2003/02/22 03:14:29 squidadm Exp $ + * $Id: DelaySpec.h,v 1.2.32.1 2007/10/27 12:23:00 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -34,6 +33,7 @@ #ifndef SQUID_DELAYSPEC_H #define SQUID_DELAYSPEC_H +/// \ingroup DelyPoolsAPI class DelaySpec { Index: squid3/src/DelayTagged.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/DelayTagged.h,v retrieving revision 1.4 retrieving revision 1.4.30.1 diff -u -r1.4 -r1.4.30.1 --- squid3/src/DelayTagged.h 5 Aug 2003 02:12:48 -0000 1.4 +++ squid3/src/DelayTagged.h 27 Oct 2007 12:23:00 -0000 1.4.30.1 @@ -1,6 +1,5 @@ - /* - * $Id: DelayTagged.h,v 1.4 2003/08/05 02:12:48 squidadm Exp $ + * $Id: DelayTagged.h,v 1.4.30.1 2007/10/27 12:23:00 amosjeffries Exp $ * * DEBUG: section 77 Delay Pools * AUTHOR: Robert Collins @@ -49,6 +48,7 @@ #include "Array.h" #include "splay.h" +/// \ingroup DelayPoolsAPI class DelayTaggedBucket : public RefCountable { @@ -64,6 +64,7 @@ String tag; }; +/// \ingroup DelayPoolsAPI class DelayTagged : public CompositePoolNode { @@ -82,7 +83,8 @@ private: -class Id:public DelayIdComposite + /// \ingroup DelayPoolsInternal + class Id:public DelayIdComposite { public: Index: squid3/src/DelayUser.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/DelayUser.h,v retrieving revision 1.7 retrieving revision 1.7.28.1 diff -u -r1.7 -r1.7.28.1 --- squid3/src/DelayUser.h 5 Aug 2003 02:12:48 -0000 1.7 +++ squid3/src/DelayUser.h 27 Oct 2007 12:23:00 -0000 1.7.28.1 @@ -1,6 +1,5 @@ - /* - * $Id: DelayUser.h,v 1.7 2003/08/05 02:12:48 squidadm Exp $ + * $Id: DelayUser.h,v 1.7.28.1 2007/10/27 12:23:00 amosjeffries Exp $ * * DEBUG: section 77 Delay Pools * AUTHOR: Robert Collins @@ -49,6 +48,7 @@ #include "Array.h" #include "splay.h" +/// \ingroup DelayPoolsAPI class DelayUserBucket : public RefCountable { @@ -64,6 +64,7 @@ AuthUser *authUser; }; +/// \ingroup DelayPoolsAPI class DelayUser : public CompositePoolNode { @@ -82,7 +83,8 @@ private: -class Id:public DelayIdComposite + /// \ingroup DelayPoolsInternal + class Id:public DelayIdComposite { public: Index: squid3/src/DelayVector.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/DelayVector.h,v retrieving revision 1.9 retrieving revision 1.9.28.1 diff -u -r1.9 -r1.9.28.1 --- squid3/src/DelayVector.h 5 Aug 2003 02:12:48 -0000 1.9 +++ squid3/src/DelayVector.h 27 Oct 2007 12:23:00 -0000 1.9.28.1 @@ -1,6 +1,5 @@ - /* - * $Id: DelayVector.h,v 1.9 2003/08/05 02:12:48 squidadm Exp $ + * $Id: DelayVector.h,v 1.9.28.1 2007/10/27 12:23:00 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -38,6 +37,7 @@ #include "CompositePoolNode.h" +/// \ingroup DelayPoolsAPI class DelayVector : public CompositePoolNode { @@ -57,7 +57,8 @@ private: -class Id:public DelayIdComposite + /// \ingroup DelayPoolsInternal + class Id:public DelayIdComposite { public: Index: squid3/src/delay_pools.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/delay_pools.cc,v retrieving revision 1.21 retrieving revision 1.21.2.1 diff -u -r1.21 -r1.21.2.1 --- squid3/src/delay_pools.cc 28 Apr 2007 22:51:50 -0000 1.21 +++ squid3/src/delay_pools.cc 27 Oct 2007 12:23:00 -0000 1.21.2.1 @@ -1,6 +1,5 @@ - /* - * $Id: delay_pools.cc,v 1.21 2007/04/28 22:51:50 squidadm Exp $ + * $Id: delay_pools.cc,v 1.21.2.1 2007/10/27 12:23:00 amosjeffries Exp $ * * DEBUG: section 77 Delay Pools * AUTHOR: Robert Collins @@ -37,6 +36,11 @@ * Copyright (c) 2003, Robert Collins */ +/** + \defgroup DelayPoolsInternal Delay Pools Internal + \ingroup DelayPoolsAPI + */ + #include "config.h" #if DELAY_POOLS @@ -63,8 +67,10 @@ #include "DelayUser.h" #include "DelayTagged.h" +/// \ingroup DelayPoolsInternal long DelayPools::MemoryUsed = 0; +/// \ingroup DelayPoolsInternal class Aggregate : public CompositePoolNode { @@ -87,7 +93,8 @@ private: -class AggregateId:public DelayIdComposite + /// \ingroup DelayPoolsInternal + class AggregateId:public DelayIdComposite { public: @@ -108,8 +115,8 @@ DelaySpec spec; }; +/// \ingroup DelayPoolsInternal template - class VectorMap { @@ -129,6 +136,7 @@ unsigned int nextMapPosition; }; +/// \ingroup DelayPoolsInternal class VectorPool : public CompositePoolNode { @@ -156,7 +164,8 @@ DelaySpec spec; -class Id:public DelayIdComposite + /// \ingroup DelayPoolsInternal + class Id:public DelayIdComposite { public: @@ -172,6 +181,7 @@ }; }; +/// \ingroup DelayPoolsInternal class IndividualPool : public VectorPool { @@ -186,6 +196,7 @@ }; +/// \ingroup DelayPoolsInternal class ClassCNetPool : public VectorPool { @@ -200,7 +211,7 @@ }; /* don't use remote storage for these */ - +/// \ingroup DelayPoolsInternal class ClassCBucket { @@ -217,6 +228,7 @@ VectorMap individuals; }; +/// \ingroup DelayPoolsInternal class ClassCHostPool : public CompositePoolNode { @@ -250,7 +262,8 @@ friend class ClassCHostPool::Id; -class Id:public DelayIdComposite + /// \ingroup DelayPoolsInternal + class Id:public DelayIdComposite { public: @@ -779,7 +792,7 @@ return index < size(); } -/* returns the used position, or the position to allocate */ +/** returns the used position, or the position to allocate */ template unsigned char VectorMap::findKeyIndex (Key const key) const