4
* DEBUG: section 77 Delay Pools
5
* AUTHOR: Robert Collins <robertc@squid-cache.org>
6
* Based upon original delay pools code by
7
* David Luyer <david@luyer.net>
9
* SQUID Web Proxy Cache http://www.squid-cache.org/
10
* ----------------------------------------------------------
12
* Squid is the result of efforts by numerous individuals from
13
* the Internet community; see the CONTRIBUTORS file for full
14
* details. Many organizations have provided support for Squid's
15
* development; see the SPONSORS file for full details. Squid is
16
* Copyrighted (C) 2001 by the Regents of the University of
17
* California; see the COPYRIGHT file for full details. Squid
18
* incorporates software developed and/or copyrighted by other
19
* sources; see the CREDITS file for full details.
21
* This program is free software; you can redistribute it and/or modify
22
* it under the terms of the GNU General Public License as published by
23
* the Free Software Foundation; either version 2 of the License, or
24
* (at your option) any later version.
26
* This program is distributed in the hope that it will be useful,
27
* but WITHOUT ANY WARRANTY; without even the implied warranty of
28
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29
* GNU General Public License for more details.
31
* You should have received a copy of the GNU General Public License
32
* along with this program; if not, write to the Free Software
33
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
36
* Copyright (c) 2003, Robert Collins <robertc@squid-cache.org>
42
#include "DelayPool.h"
43
#include "CommonPool.h"
45
#include "acl/Gadgets.h"
48
DelayPool::DelayPool() : pool (NULL), access (NULL)
50
pool = CommonPool::Factory(0, theComposite_);
53
DelayPool::~DelayPool()
59
aclDestroyAccessList(&access);
65
assert(theComposite() != NULL);
66
theComposite()->parse();
70
DelayPool::dump(StoreEntry *entry, unsigned int i) const
72
if (theComposite() == NULL)
75
storeAppendPrintf(entry, "delay_class %d %s\n", i + 1, pool->theClassTypeLabel());
77
LOCAL_ARRAY(char, nom, 32);
79
snprintf(nom, 32, "delay_access %d", i + 1);
81
dump_acl_access(entry, nom, access);
83
storeAppendPrintf(entry, "delay_parameters %d", i + 1);
85
theComposite()->dump (entry);
87
storeAppendPrintf(entry, "\n");
91
DelayPool::createPool(u_char delay_class)
96
pool = CommonPool::Factory(delay_class, theComposite_);
100
DelayPool::freeData()
106
/** \todo XXX create DelayIdComposite.cc */
108
CompositePoolNode::delayRead(DeferredRead const &aRead)
110
deferredReads.delayRead(aRead);
116
CompositePoolNode::kickReads()
118
deferredReads.kickReads(-1);