SMultiPKFile Class Reference

#include <SMultiPKFile.H>

List of all members.

Public Types

typedef Table< FP::Tag, VPKFile
* >::Default 
VPKFileMap
typedef Table< FP::Tag, VPKFile
* >::Iterator 
VPKFileIter
typedef Table< FP::Tag, VPKFileChkPt
* >::Default 
ChkPtTbl
typedef Table< FP::Tag, VPKFileChkPt
* >::Iterator 
ChkPtIter

Static Public Member Functions

static void OpenRead (const PKPrefix::T &pfx, std::ifstream &ifs) throw (SMultiPKFileRep::NotFound, FS::Failure)
static std::streampos SeekToPKFile (std::ifstream &ifs, const FP::Tag &pk, int &version) throw (SMultiPKFileRep::NotFound, FS::Failure)
static bool ChkptForRewrite (VPKFileMap &vpkFiles, const BitVector *toDelete, ChkPtTbl &vpkChkptTbl) throw ()
static bool PrepareForRewrite (const PKPrefix::T &pfx, std::ifstream &ifs, SMultiPKFileRep::Header *&hdr) throw (FS::Failure, FS::EndOfFile)
static void Rewrite (const PKPrefix::T &pfx, bool mpkFileExists, std::ifstream &ifs, SMultiPKFileRep::Header *hdr, VPKFileMap &vpkFiles, ChkPtTbl &vpkChkptTbl, const BitVector *toDelete, EmptyPKLog *emptyPKLog, EntryState &state) throw (FS::Failure, FS::EndOfFile, VestaLog::Error)

Static Private Member Functions

static std::streampos SeekInListV1 (std::ifstream &ifs, SMultiPKFileRep::UShort numEntries, const FP::Tag &pk) throw (SMultiPKFileRep::NotFound, FS::EndOfFile, FS::Failure)
static std::streampos SeekInSortedListV1 (std::ifstream &ifs, SMultiPKFileRep::UShort numEntries, const FP::Tag &pk) throw (SMultiPKFileRep::NotFound, FS::EndOfFile, FS::Failure)
static SMultiPKFileRep::HeaderReadHeader (const PKPrefix::T &pfx, bool readEntries, std::ifstream &ifs) throw (FS::Failure, FS::EndOfFile)
static Text Name (const PKPrefix::T &pfx, int granBits) throw ()
static Text FullName (const PKPrefix::T &pfx) throw ()
static void OpenAtomicWrite (const PKPrefix::T &pfx, AtomicFile &ofs) throw (FS::Failure)
static void DeleteFile (const PKPrefix::T &pfx) throw (FS::Failure)
static void MakeDirs (const Text &name) throw (FS::Failure)
static void PauseDeletionThread () throw ()


Detailed Description

Definition at line 64 of file SMultiPKFile.H.


Member Typedef Documentation

typedef Table<FP::Tag,VPKFile*>::Default SMultiPKFile::VPKFileMap

Definition at line 67 of file SMultiPKFile.H.

typedef Table<FP::Tag,VPKFile*>::Iterator SMultiPKFile::VPKFileIter

Definition at line 68 of file SMultiPKFile.H.

typedef Table<FP::Tag,VPKFileChkPt*>::Default SMultiPKFile::ChkPtTbl

Definition at line 71 of file SMultiPKFile.H.

typedef Table<FP::Tag,VPKFileChkPt*>::Iterator SMultiPKFile::ChkPtIter

Definition at line 72 of file SMultiPKFile.H.


Member Function Documentation

static void SMultiPKFile::OpenRead ( const PKPrefix::T pfx,
std::ifstream &  ifs 
) throw (SMultiPKFileRep::NotFound, FS::Failure) [static]

Referenced by VPKFile::Lookup(), and VPKFile::ReadPKFHeaderTail().

Here is the caller graph for this function:

static std::streampos SMultiPKFile::SeekToPKFile ( std::ifstream &  ifs,
const FP::Tag pk,
int &  version 
) throw (SMultiPKFileRep::NotFound, FS::Failure) [static]

Referenced by VPKFile::Lookup(), and VPKFile::ReadPKFHeaderTail().

Here is the caller graph for this function:

bool SMultiPKFile::ChkptForRewrite ( VPKFileMap vpkFiles,
const BitVector toDelete,
ChkPtTbl vpkChkptTbl 
) throw () [static]

Definition at line 191 of file SMultiPKFile.C.

References VPKFile::CheckPoint(), VPKFile::HasNewEntries(), Basics::mutex::lock(), VPKFile::mu, Table< K, V >::Iterator::Next(), Table< K, V >::Iterator::Reset(), and Basics::mutex::unlock().

Referenced by VMultiPKFile::ChkptForWrite().

Here is the call graph for this function:

Here is the caller graph for this function:

static bool SMultiPKFile::PrepareForRewrite ( const PKPrefix::T pfx,
std::ifstream &  ifs,
SMultiPKFileRep::Header *&  hdr 
) throw (FS::Failure, FS::EndOfFile) [static]

Referenced by CacheS::VToSCache().

Here is the caller graph for this function:

static void SMultiPKFile::Rewrite ( const PKPrefix::T pfx,
bool  mpkFileExists,
std::ifstream &  ifs,
SMultiPKFileRep::Header hdr,
VPKFileMap vpkFiles,
ChkPtTbl vpkChkptTbl,
const BitVector toDelete,
EmptyPKLog emptyPKLog,
EntryState state 
) throw (FS::Failure, FS::EndOfFile, VestaLog::Error) [static]

static std::streampos SMultiPKFile::SeekInListV1 ( std::ifstream &  ifs,
SMultiPKFileRep::UShort  numEntries,
const FP::Tag pk 
) throw (SMultiPKFileRep::NotFound, FS::EndOfFile, FS::Failure) [static, private]

static std::streampos SMultiPKFile::SeekInSortedListV1 ( std::ifstream &  ifs,
SMultiPKFileRep::UShort  numEntries,
const FP::Tag pk 
) throw (SMultiPKFileRep::NotFound, FS::EndOfFile, FS::Failure) [static, private]

static SMultiPKFileRep::Header* SMultiPKFile::ReadHeader ( const PKPrefix::T pfx,
bool  readEntries,
std::ifstream &  ifs 
) throw (FS::Failure, FS::EndOfFile) [static, private]

Text SMultiPKFile::Name ( const PKPrefix::T pfx,
int  granBits 
) throw () [static, private]

Definition at line 666 of file SMultiPKFile.C.

Text SMultiPKFile::FullName ( const PKPrefix::T pfx  )  throw () [static, private]

Definition at line 676 of file SMultiPKFile.C.

References Config_SCachePath, and PKPrefix::Granularity().

Here is the call graph for this function:

void SMultiPKFile::OpenAtomicWrite ( const PKPrefix::T pfx,
AtomicFile ofs 
) throw (FS::Failure) [static, private]

Definition at line 683 of file SMultiPKFile.C.

References Text::chars(), and AtomicFile::open().

Here is the call graph for this function:

void SMultiPKFile::DeleteFile ( const PKPrefix::T pfx  )  throw (FS::Failure) [static, private]

Definition at line 746 of file SMultiPKFile.C.

References Config_SCachePath, FS::Delete(), FS::DeleteDir(), Text::FindCharR(), Text::Length(), and Text::Sub().

Here is the call graph for this function:

void SMultiPKFile::MakeDirs ( const Text name  )  throw (FS::Failure) [static, private]

Definition at line 709 of file SMultiPKFile.C.

References PathnameSep.

void SMultiPKFile::PauseDeletionThread (  )  throw () [static, private]

Definition at line 762 of file SMultiPKFile.C.

References OS::cio(), Config_WeedPauseDur, OS::ThreadIO::end_out(), Basics::thread::pause(), OS::ThreadIO::start_out(), and Debug::Timestamp().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Fri May 25 01:22:10 2007 for Vesta by  doxygen 1.5.1