]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/fs/ufs/StoreSearchUFS.cc
2 * Copyright (C) 1996-2014 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 47 Store Directory Routines */
13 #include "StoreSearchUFS.h"
14 #include "UFSSwapDir.h"
16 CBDATA_NAMESPACED_CLASS_INIT(Fs::Ufs
,StoreSearchUFS
);
18 Fs::Ufs::StoreSearchUFS::StoreSearchUFS(RefCount
<UFSSwapDir
> aSwapDir
) :
19 sd(aSwapDir
), walker (sd
->repl
->WalkInit(sd
->repl
)),
20 current (NULL
), _done (false)
23 Fs::Ufs::StoreSearchUFS::~StoreSearchUFS()
30 Fs::Ufs::StoreSearchUFS::next(void (aCallback
)(void *cbdata
), void *aCallbackArgs
)
33 aCallback(aCallbackArgs
);
37 Fs::Ufs::StoreSearchUFS::next()
39 /* the walker API doesn't make sense. the store entries referred to are already readwrite
40 * from their hash table entries
44 current
= const_cast<StoreEntry
*>(walker
->Next(walker
));
49 return current
!= NULL
;
53 Fs::Ufs::StoreSearchUFS::error() const
59 Fs::Ufs::StoreSearchUFS::isDone() const
65 Fs::Ufs::StoreSearchUFS::currentItem()