]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/DelayPool.cc
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"
47 DelayPool::DelayPool() : pool (NULL
), access (NULL
)
49 pool
= CommonPool::Factory(0, theComposite_
);
52 DelayPool::~DelayPool()
58 aclDestroyAccessList(&access
);
64 assert(theComposite() != NULL
);
65 theComposite()->parse();
69 DelayPool::dump(StoreEntry
*entry
, unsigned int i
) const
71 if (theComposite() == NULL
)
74 storeAppendPrintf(entry
, "delay_class %d %s\n", i
+ 1, pool
->theClassTypeLabel());
76 LOCAL_ARRAY(char, nom
, 32);
78 snprintf(nom
, 32, "delay_access %d", i
+ 1);
80 dump_acl_access(entry
, nom
, access
);
82 storeAppendPrintf(entry
, "delay_parameters %d", i
+ 1);
84 theComposite()->dump (entry
);
86 storeAppendPrintf(entry
, "\n");
90 DelayPool::createPool(u_char delay_class
)
95 pool
= CommonPool::Factory(delay_class
, theComposite_
);
105 /** \todo XXX create DelayIdComposite.cc */
107 CompositePoolNode::delayRead(DeferredRead
const &aRead
)
109 deferredReads
.delayRead(aRead
);
115 CompositePoolNode::kickReads()
117 deferredReads
.kickReads(-1);