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

VRWeed.C File Reference

#include "VRWeed.H"
#include "VMemPool.H"
#include "VestaSource.H"
#include "VDirChangeable.H"
#include "VDirEvaluator.H"
#include "VForward.H"
#include "ReadersWritersLock.H"
#include "SourceOrDerived.H"
#include "VestaLog.H"
#include "Recovery.H"
#include "VestaConfig.H"
#include "ShortIdImpl.H"
#include "VRConcurrency.H"
#include "VestaAttribsRep.H"
#include "DirShortId.H"
#include "Mastership.H"
#include "logging.H"
#include <Thread.H>
#include <fstream>
#include <sys/time.h>
#include <BufStream.H>
#include "MutableSidref.H"
#include "lock_timing.H"

Go to the source code of this file.

Functions

void InitVRWeed ()
int KeepDerived (ShortIdsFile ds, time_t dt, bool force)
int SourceWeed () throw ()
int DoDeletions () throw ()
void Checkpoint () throw ()
void CheckpointServer () throw ()
void GetWeedingState (ShortIdsFile &ds, time_t &dt, ShortIdsFile &ss, time_t &st, bool &sourceWeedInProgress, bool &deletionsInProgress, bool &deletionsDone, bool &checkpointInProgress) throw ()


Function Documentation

void Checkpoint  )  throw ()
 

Definition at line 513 of file VRWeed.C.

References CacheEntry::IndicesApp::Append(), Basics::cond::broadcast(), CacheC::Checkpoint(), VestaSource::fptag, ThreadData::head, CacheEntry::Indices::index, CacheEntry::Indices::len, Basics::mutex::lock(), ThreadData::mu, ThreadData::next, ThreadData::orphanCIs, theCache, topModelRoot, topModelSid, Basics::mutex::unlock(), and Basics::cond::wait().

void CheckpointServer  )  throw ()
 

Definition at line 530 of file VRWeed.C.

References ReadersWritersLock::acquireWrite(), Basics::cond::broadcast(), VestaLog::checkpointBegin(), VestaLog::checkpointEnd(), Repos::dprintf(), VDirVolatileRoot::finishCheckpoint(), Basics::mutex::lock(), VDirVolatileRoot::lockAll(), MastershipCheckpoint(), MutableSidrefCheck(), LongId::noLock, VMemPool::readCheckpoint(), ReadersWritersLock::releaseWrite(), RWLOCK_LOCKED_REASON, ShortIdBlockCheckpoint(), StableLock, Basics::mutex::unlock(), VDirVolatileRoot::unlockAll(), VolatileRootLock, VRLog, VRLogVersion, Basics::cond::wait(), and VMemPool::writeCheckpoint().

Referenced by main().

int DoDeletions  )  throw ()
 

Definition at line 384 of file VRWeed.C.

References ReadersWritersLock::acquireWrite(), Basics::cond::broadcast(), Text::cchars(), FdCache::close(), VestaLog::commit(), DeleteAllShortIdsBut(), DoDeletions(), Repos::dprintf(), SourceOrDerived::fdcreate(), VestaConfig::get(), Basics::mutex::lock(), NullShortId, VestaLog::put(), RWLOCK_LOCKED_REASON, SourceOrDerived::shortIdToName(), StableLock, VestaLog::start(), Basics::mutex::unlock(), VRLog, and Basics::cond::wait().

Referenced by DoDeletions(), KeepDerived(), and main().

void GetWeedingState ShortIdsFile ds,
time_t &  dt,
ShortIdsFile ss,
time_t &  st,
bool &  sourceWeedInProgress,
bool &  deletionsInProgress,
bool &  deletionsDone,
bool &  checkpointInProgress
throw ()
 

Definition at line 619 of file VRWeed.C.

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

Referenced by ShortIdBlock::getWeedingState(), and ShortIdReceptionist().

void InitVRWeed  ) 
 

Definition at line 137 of file VRWeed.C.

References VDirChangeable::markCallback(), VForward::markCallback(), VDirEvaluator::markCallback(), VestaAttribsRep::markCallback(), VDirChangeable::rebuildCallback(), VForward::rebuildCallback(), VDirEvaluator::rebuildCallback(), VestaAttribsRep::rebuildCallback(), VMemPool::registerCallbacks(), RegisterRecoveryCallback(), VDirChangeable::sweepCallback(), VForward::sweepCallback(), VDirEvaluator::sweepCallback(), VestaAttribsRep::sweepCallback(), VMemPool::vAttrib, VMemPool::vDirAppendable, VMemPool::vDirChangeable, VMemPool::vDirEvaluator, VMemPool::vDirImmutable, and VMemPool::vForward.

Referenced by VestaSource::init().

int KeepDerived ShortIdsFile  ds,
time_t  dt,
bool  force
 

Definition at line 199 of file VRWeed.C.

References FdCache::close(), DBG_ALWAYS, DoDeletions(), Repos::dprintf(), SourceOrDerived::fdopen(), Basics::mutex::lock(), NullShortId, SourceWeed(), Basics::mutex::unlock(), and Basics::cond::wait().

Referenced by ShortIdBlock::keepDerived(), and ShortIdReceptionist().

int SourceWeed  )  throw ()
 

Definition at line 240 of file VRWeed.C.

References ReadersWritersLock::acquireWrite(), Basics::cond::broadcast(), DBG_ALWAYS, Repos::dprintf(), SourceOrDerived::fdcreate(), VMemPool::gc(), Basics::mutex::lock(), VDirVolatileRoot::lockAll(), ReadersWritersLock::releaseWrite(), RWLOCK_LOCKED_REASON, StableLock, Basics::mutex::unlock(), VDirVolatileRoot::unlockAll(), VolatileRootLock, and Basics::cond::wait().

Referenced by KeepDerived(), and main().


Generated on Mon May 8 00:49:04 2006 for Vesta by  doxygen 1.4.2