]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/DelayPool.cc
2 * Copyright (C) 1996-2023 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 */
15 #include "acl/Gadgets.h"
16 #include "CommonPool.h"
17 #include "DelayPool.h"
20 DelayPool::DelayPool() : pool (nullptr), access (nullptr)
22 pool
= CommonPool::Factory(0, theComposite_
);
25 DelayPool::~DelayPool()
31 aclDestroyAccessList(&access
);
37 assert(theComposite() != nullptr);
38 theComposite()->parse();
42 DelayPool::dump(StoreEntry
*entry
, unsigned int i
) const
44 if (theComposite() == nullptr)
47 storeAppendPrintf(entry
, "delay_class %d " SQUIDSBUFPH
"\n", i
+ 1, SQUIDSBUFPRINT(pool
->classTypeLabel()));
49 LOCAL_ARRAY(char, nom
, 32);
51 snprintf(nom
, 32, "delay_access %d", i
+ 1);
53 dump_acl_access(entry
, nom
, access
);
55 storeAppendPrintf(entry
, "delay_parameters %d", i
+ 1);
57 theComposite()->dump (entry
);
59 storeAppendPrintf(entry
, "\n");
63 DelayPool::createPool(u_char delay_class
)
68 pool
= CommonPool::Factory(delay_class
, theComposite_
);
78 // TODO: create DelayIdComposite.cc
80 CompositePoolNode::delayRead(const AsyncCall::Pointer
&aRead
)
82 deferredReads
.delay(aRead
);
88 CompositePoolNode::kickReads()
90 deferredReads
.schedule();
93 #endif /* USE_DELAY_POOLS */