Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

VMultiPKFile Class Reference

#include <VMultiPKFile.H>

List of all members.

Public Member Functions

 VMultiPKFile (const PKPrefix::T &pfx) throw ()
bool Get (const FP::Tag &pk, VPKFile *&vpk) throw ()
bool Put (const FP::Tag &pk, VPKFile *vpk) throw ()
bool Delete (const FP::Tag &pk, VPKFile *&vpk) throw ()
int NumVPKFiles () const throw ()
const SMultiPKFile::VPKFileMapVPKFileTbl () const throw ()
void IncEntries () throw ()
bool IsFull () throw ()
bool LockForWrite (Basics::mutex &mu, const BitVector *toDelete) throw ()
bool ChkptForWrite (Basics::mutex &mu, const BitVector *toDelete, SMultiPKFile::VPKFileMap &toFlush, SMultiPKFile::ChkPtTbl &vpkChkptTbl) throw ()
void ReleaseWriteLock (Basics::mutex &mu) throw ()
void ToSCache (Basics::mutex &mu, bool mpkFileExists, std::ifstream &ifs, SMultiPKFileRep::Header *hdr, SMultiPKFile::VPKFileMap &toFlush, SMultiPKFile::ChkPtTbl &vpkChkptTbl, const BitVector *toDelete, EmptyPKLog *emptyPKLog, EntryState &state) throw (FS::Failure, FS::EndOfFile, VestaLog::Error)
void UpdateEpoch (int currentEpoch) throw ()
bool IsStale (int latestEpoch) throw ()
const PKPrefix::TPrefix () const throw ()
bool IsUnmodified () const throw ()
bool FlushRunning () const throw ()
bool FlushPending () const throw ()

Private Attributes

PKPrefix::T prefix
SMultiPKFile::VPKFileMap tbl
int freeMPKFileEpoch
int numWaiting
int numRunning
Basics::cond noneRunning
int numNewEntries
bool autoFlushPending


Constructor & Destructor Documentation

VMultiPKFile::VMultiPKFile const PKPrefix::T pfx  )  throw () [inline]
 

Definition at line 51 of file VMultiPKFile.H.


Member Function Documentation

bool VMultiPKFile::ChkptForWrite Basics::mutex mu,
const BitVector toDelete,
SMultiPKFile::VPKFileMap toFlush,
SMultiPKFile::ChkPtTbl vpkChkptTbl
throw ()
 

Definition at line 78 of file VMultiPKFile.C.

References SMultiPKFile::ChkptForRewrite(), Basics::mutex::lock(), mu, and Basics::mutex::unlock().

Referenced by CacheS::VToSCache().

bool VMultiPKFile::Delete const FP::Tag pk,
VPKFile *&  vpk
throw () [inline]
 

Definition at line 69 of file VMultiPKFile.H.

References Table< K, V >::Default::Delete(), and tbl.

Referenced by CacheS_DoFreeMPKFiles().

bool VMultiPKFile::FlushPending  )  const throw () [inline]
 

Definition at line 219 of file VMultiPKFile.H.

References autoFlushPending.

Referenced by CacheS_DoFreeMPKFiles().

bool VMultiPKFile::FlushRunning  )  const throw () [inline]
 

Definition at line 213 of file VMultiPKFile.H.

Referenced by CacheS_DoFreeMPKFiles().

bool VMultiPKFile::Get const FP::Tag pk,
VPKFile *&  vpk
throw () [inline]
 

Definition at line 57 of file VMultiPKFile.H.

References Table< K, V >::Default::Get(), and tbl.

void VMultiPKFile::IncEntries  )  throw () [inline]
 

Definition at line 90 of file VMultiPKFile.H.

References numNewEntries.

Referenced by CacheS::AddEntryToMPKFile().

bool VMultiPKFile::IsFull  )  throw ()
 

Definition at line 37 of file VMultiPKFile.C.

References autoFlushPending, Config_MPKFileFlushNum, numNewEntries, and numWaiting.

Referenced by CacheS::AddEntryToMPKFile().

bool VMultiPKFile::IsStale int  latestEpoch  )  throw ()
 

Definition at line 155 of file VMultiPKFile.C.

References Config_FlushNewPeriodCnt.

Referenced by CacheS_DoFreeMPKFiles().

bool VMultiPKFile::IsUnmodified  )  const throw () [inline]
 

Definition at line 207 of file VMultiPKFile.H.

References freeMPKFileEpoch.

Referenced by CacheS_DoFreeMPKFiles().

bool VMultiPKFile::LockForWrite Basics::mutex mu,
const BitVector toDelete
throw ()
 

Definition at line 46 of file VMultiPKFile.C.

References mu.

Referenced by CacheS::VToSCache().

int VMultiPKFile::NumVPKFiles  )  const throw () [inline]
 

Definition at line 77 of file VMultiPKFile.H.

References Table< K, V >::Default::Size(), and tbl.

Referenced by CacheS_DoFreeMPKFiles().

const PKPrefix::T& VMultiPKFile::Prefix  )  const throw () [inline]
 

Definition at line 203 of file VMultiPKFile.H.

References prefix.

Referenced by CacheS::VToSCache().

bool VMultiPKFile::Put const FP::Tag pk,
VPKFile vpk
throw () [inline]
 

Definition at line 63 of file VMultiPKFile.H.

References Table< K, V >::Default::Put(), and tbl.

Referenced by CacheS::GetVPKFile(), and CacheS::VToSCache().

void VMultiPKFile::ReleaseWriteLock Basics::mutex mu  )  throw ()
 

Definition at line 106 of file VMultiPKFile.C.

References Basics::mutex::lock(), mu, and Basics::mutex::unlock().

Referenced by CacheS::VToSCache().

void VMultiPKFile::ToSCache Basics::mutex mu,
bool  mpkFileExists,
std::ifstream &  ifs,
SMultiPKFileRep::Header hdr,
SMultiPKFile::VPKFileMap toFlush,
SMultiPKFile::ChkPtTbl vpkChkptTbl,
const BitVector toDelete,
EmptyPKLog emptyPKLog,
EntryState state
throw (FS::Failure, FS::EndOfFile, VestaLog::Error)
 

Definition at line 121 of file VMultiPKFile.C.

References mu, and SMultiPKFile::Rewrite().

Referenced by CacheS::VToSCache().

void VMultiPKFile::UpdateEpoch int  currentEpoch  )  throw () [inline]
 

Definition at line 193 of file VMultiPKFile.H.

References freeMPKFileEpoch.

Referenced by CacheS::AddEntryToMPKFile().

const SMultiPKFile::VPKFileMap& VMultiPKFile::VPKFileTbl  )  const throw () [inline]
 

Definition at line 83 of file VMultiPKFile.H.

References tbl.

Referenced by CacheS_DoFreeMPKFiles().


Member Data Documentation

bool VMultiPKFile::autoFlushPending [private]
 

Definition at line 237 of file VMultiPKFile.H.

Referenced by FlushPending(), and IsFull().

int VMultiPKFile::freeMPKFileEpoch [private]
 

Definition at line 232 of file VMultiPKFile.H.

Referenced by IsUnmodified(), and UpdateEpoch().

Basics::cond VMultiPKFile::noneRunning [private]
 

Definition at line 235 of file VMultiPKFile.H.

int VMultiPKFile::numNewEntries [private]
 

Definition at line 236 of file VMultiPKFile.H.

Referenced by IncEntries(), and IsFull().

int VMultiPKFile::numRunning [private]
 

Definition at line 234 of file VMultiPKFile.H.

int VMultiPKFile::numWaiting [private]
 

Definition at line 233 of file VMultiPKFile.H.

Referenced by IsFull().

PKPrefix::T VMultiPKFile::prefix [private]
 

Definition at line 228 of file VMultiPKFile.H.

Referenced by Prefix().

SMultiPKFile::VPKFileMap VMultiPKFile::tbl [private]
 

Definition at line 231 of file VMultiPKFile.H.

Referenced by Delete(), Get(), NumVPKFiles(), Put(), and VPKFileTbl().


The documentation for this class was generated from the following files:
Generated on Mon May 8 00:49:17 2006 for Vesta by  doxygen 1.4.2