#include <VestaLog.H>
Collaboration diagram for VestaLog:

Public Member Functions | |
| VestaLog () throw () | |
| void | open (char *dir, int ver=-1, bool readonly=false, bool lock=false, char *dir2=NULL, bool bakckp=false) throw (Error) |
| int | logVersion () throw (Error) |
| std::fstream * | openCheckpoint () throw (Error) |
| void | get (char &c) throw (Eof, Error) |
| void | get (char *p, int n, char term='\n') throw (Eof, Error) |
| int | read (char *p, int n) throw (Error) |
| void | readAll (char *p, int n) throw (Eof, Error) |
| bool | eof () throw (Error) |
| bool | nextLog () throw (Error) |
| void | loggingBegin () throw (Error) |
| void | start () throw (Error) |
| int | nesting () throw () |
| void | put (char c) throw (Error) |
| void | put (const char *p) throw (Error) |
| void | write (const char *p, int n) throw (Error) |
| void | commit () throw (Error) |
| void | abort () throw (Error) |
| std::fstream * | checkpointBegin (std::ios::openmode mode=std::ios::out) throw (Error) |
| void | checkpointEnd () throw (Error) |
| void | checkpointAbort () throw (Error) |
| std::fstream * | checkpointResume (std::ios::openmode mode=std::ios::out|std::ios::trunc) throw (Error) |
| void | prune (int ckpkeep, bool logkeep=false, bool prunebak=true) throw (Error) |
| void | close () throw () |
Private Attributes | |
| VestaLogPrivate * | vlp |
Classes | |
| class | Eof |
| class | Error |
| class | Exception |
Definition at line 233 of file VestaLog.H.
| VestaLog::VestaLog | ( | ) | throw () |
Definition at line 60 of file VestaLog.C.
References VestaLogPrivate::initial, NEW, VestaLogPrivate::state, and vlp.
| void VestaLog::open | ( | char * | dir, | |
| int | ver = -1, |
|||
| bool | readonly = false, |
|||
| bool | lock = false, |
|||
| char * | dir2 = NULL, |
|||
| bool | bakckp = false | |||
| ) | throw (Error) |
Definition at line 66 of file VestaLog.C.
References VestaLogPrivate::bad, Text::cchars(), Basics::errno_Text(), VestaLogPrivate::initial, NEW_PTRFREE_ARRAY, ok(), FdCache::open(), PathnameSep, and VestaLogPrivate::recovering.
Referenced by main(), nextLog(), Print_used_cis(), PrintCacheLog(), PrintMPKsToWeed(), Recover(), CacheS::RecoverCacheLog(), CacheS::RecoverCILog(), CacheS::RecoverGraphLog(), and CacheS::RecoverWeededMPKs().
Here is the call graph for this function:

Here is the caller graph for this function:

| int VestaLog::logVersion | ( | ) | throw (Error) |
Definition at line 220 of file VestaLog.C.
References VestaLogPrivate::bad, VestaLogPrivate::initial, VestaLogPrivate::state, VestaLogPrivate::version, and vlp.
Referenced by CheckpointServer(), CacheS::ChkptGraphLog(), CacheS::CleanCacheLog(), and CacheS::RecoverGraphLog().
Here is the caller graph for this function:

| fstream * VestaLog::openCheckpoint | ( | ) | throw (Error) |
Definition at line 229 of file VestaLog.C.
References VestaLogPrivate::bad, Text::cchars(), VestaLogPrivate::directory, Basics::errno_Text(), NEW_CONSTR, PathnameSep, VestaLogPrivate::recovering, VestaLogPrivate::state, VestaLogPrivate::version, and vlp.
Referenced by main(), Print_used_cis(), PrintCacheLog(), Recover(), CacheS::RecoverCacheLog(), and CacheS::RecoverCILog().
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 246 of file VestaLog.C.
References VestaLogPrivate::recovering.
Referenced by main().
Here is the caller graph for this function:

| int VestaLog::read | ( | char * | p, | |
| int | n | |||
| ) | throw (Error) |
Definition at line 511 of file VestaLog.C.
References VestaLogPrivate::recovering.
Referenced by abort().
Here is the caller graph for this function:

Definition at line 539 of file VestaLog.C.
References VestaLogPrivate::recovering.
Referenced by PrintMPKsToWeed(), and CacheS::RecoverWeededMPKs().
Here is the caller graph for this function:

| bool VestaLog::eof | ( | ) | throw (Error) |
Definition at line 561 of file VestaLog.C.
References VestaLogPrivate::makeBytesAvail(), VestaLogPrivate::recovering, VestaLogPrivate::state, and vlp.
Referenced by RecoveryReader::eof(), and PrintMPKsToWeed().
Here is the call graph for this function:

Here is the caller graph for this function:

| bool VestaLog::nextLog | ( | ) | throw (Error) |
Definition at line 627 of file VestaLog.C.
References VestaLogPrivate::bad, Text::cchars(), close(), VestaLogPrivate::commPhy, VestaLogPrivate::commPocketPhy, VestaLogPrivate::commSeq, VestaLogPrivate::commUsePocket, VestaLogPrivate::cur, VestaLogPrivate::curLen, VestaLogPrivate::curSeq, VestaLogPrivate::directory, VestaLogPrivate::directory2, Basics::errno_Text(), VestaLogPrivate::fd, VestaLogPrivate::fd2, VestaLogPrivate::free, VestaLogPrivate::hitEOF, VestaLogPrivate::last, VestaLogPrivate::nesting, VLogBlock::next, VestaLogPrivate::nextPhy, VestaLogPrivate::nextSeq, open(), PathnameSep, VestaLogPrivate::pocket, VestaLogPrivate::readonly, VestaLogPrivate::recovered, VestaLogPrivate::recovering, VestaLogPrivate::state, VLogBlock::tailCommitted, VestaLogPrivate::usePocket, VestaLogPrivate::version, and vlp.
Referenced by main(), EmptyPKLog::NextLog(), Print_used_cis(), PrintCacheLog(), PrintMPKsToWeed(), and Recover().
Here is the call graph for this function:

Here is the caller graph for this function:

| void VestaLog::loggingBegin | ( | ) | throw (Error) |
Definition at line 709 of file VestaLog.C.
References VestaLogPrivate::balloc(), VestaLogPrivate::commPhy, VestaLogPrivate::commPocketPhy, VestaLogPrivate::commSeq, VestaLogPrivate::commUsePocket, VestaLogPrivate::cur, VestaLogPrivate::curLen, VestaLogPrivate::curSeq, VLogBlock::data, VestaLogPrivate::eraseUncommitted(), VestaLogPrivate::fd, VestaLogPrivate::fd2, VestaLogPrivate::free, VestaLogPrivate::hitEOF, VestaLogPrivate::last, VLogBlock::next, VestaLogPrivate::nextPhy, VLogBlock::phy, VestaLogPrivate::pocket, VLogBlock::pocketPhy, VestaLogPrivate::readonly, VestaLogPrivate::ready, VestaLogPrivate::recovered, VLogBlock::data_block::setLen(), VLogBlock::data_block::setSeq(), VestaLogPrivate::state, VLogBlock::tailCommitted, UNUSED_PHY, VestaLogPrivate::usePocket, and vlp.
Referenced by EmptyPKLog::EndRecovery(), main(), CacheS::RecoverCacheLog(), CacheS::RecoverCILog(), CacheS::RecoverGraphLog(), and CacheS::RecoverWeededMPKs().
Here is the call graph for this function:

Here is the caller graph for this function:

| void VestaLog::start | ( | ) | throw (Error) |
Definition at line 806 of file VestaLog.C.
References VestaLogPrivate::logging, VestaLogPrivate::nesting, VestaLogPrivate::ready, VestaLogPrivate::state, and vlp.
Referenced by AcquireMastership(), AcquireShortIdBlock(), apply_sattr(), VestaSource::cedeMastership(), VDirChangeable::collapseBase(), VDirChangeable::copyIndexToMutable(), VDirVolatileRoot::createVolatileDirectory(), do_mkdir(), DoDeletions(), CacheS::FlushCacheLog(), CacheS::FlushGraphLog(), VDirChangeable::insertAppendableDirectory(), VDirChangeable::insertFile(), VDirChangeable::insertGhost(), VDirChangeable::insertImmutableDirectory(), VDirChangeable::insertMutableDirectory(), VDirChangeable::insertMutableFile(), VDirChangeable::insertStub(), LandlordThread(), LogAllDirShortIds(), main(), VDirChangeable::makeEntryImmutable(), VDirChangeable::makeIndexMutable(), VDirChangeable::reallyDelete(), VestaSource::recoveryDone(), VDirChangeable::renameTo(), RenewShortIdBlock(), VDirChangeable::setIndexMaster(), VDirChangeable::setTimestamp(), VSAtomic(), write_one_entry(), and VestaSource::writeAttrib().
Here is the caller graph for this function:

| int VestaLog::nesting | ( | ) | throw () |
Definition at line 820 of file VestaLog.C.
References VestaLogPrivate::nesting, and vlp.
Referenced by VDirChangeable::freeTree(), VDirChangeable::insertCommon(), VDirChangeable::makeEntryImmutable(), and VDirChangeable::reallyDelete().
Here is the caller graph for this function:

| void VestaLog::put | ( | char | c | ) | throw (Error) |
Definition at line 887 of file VestaLog.C.
References VestaLogPrivate::logging.
Referenced by AcquireMastership(), AcquireShortIdBlock(), VDirChangeable::collapseBase(), VDirChangeable::copyIndexToMutable(), VDirVolatileRoot::createVolatileDirectory(), DoDeletions(), VDirChangeable::insertAppendableDirectory(), VDirChangeable::insertFile(), VDirChangeable::insertGhost(), VDirChangeable::insertImmutableDirectory(), VDirChangeable::insertMutableDirectory(), VDirChangeable::insertMutableFile(), VDirChangeable::insertStub(), LogAllDirShortIds(), LogPutQuotedString(), main(), VDirChangeable::makeEntryImmutable(), VDirChangeable::makeIndexMutable(), VDirChangeable::reallyDelete(), VestaSource::recoveryDone(), VDirChangeable::renameTo(), RenewShortIdBlock(), VDirChangeable::setIndexMaster(), VDirChangeable::setTimestamp(), and VestaSource::writeAttrib().
Here is the caller graph for this function:

| void VestaLog::put | ( | const char * | p | ) | throw (Error) |
| void VestaLog::write | ( | const char * | p, | |
| int | n | |||
| ) | throw (Error) |
Definition at line 910 of file VestaLog.C.
References VestaLogPrivate::logging.
Referenced by write_one_entry().
Here is the caller graph for this function:

| void VestaLog::commit | ( | ) | throw (Error) |
Definition at line 924 of file VestaLog.C.
References VestaLogPrivate::bad, VestaLogPrivate::commPhy, VestaLogPrivate::commPocketPhy, VestaLogPrivate::commSeq, VestaLogPrivate::commUsePocket, VestaLogPrivate::cur, VestaLogPrivate::curLen, VestaLogPrivate::curSeq, VLogBlock::data, Basics::errno_Text(), VestaLogPrivate::fd, VestaLogPrivate::fd2, VestaLogPrivate::logging, VestaLogPrivate::nesting, VLogBlock::phy, VLogBlock::pocketPhy, VestaLogPrivate::ready, VLogBlock::data_block::setLen(), VestaLogPrivate::state, VestaLogPrivate::usePocket, vlp, and VestaLogPrivate::writeCur().
Referenced by AcquireMastership(), AcquireShortIdBlock(), apply_sattr(), VestaSource::cedeMastership(), VDirChangeable::collapseBase(), VDirChangeable::copyIndexToMutable(), VDirVolatileRoot::createVolatileDirectory(), do_mkdir(), DoDeletions(), CacheS::FlushCacheLog(), CacheS::FlushGraphLog(), VDirChangeable::insertAppendableDirectory(), VDirChangeable::insertFile(), VDirChangeable::insertGhost(), VDirChangeable::insertImmutableDirectory(), VDirChangeable::insertMutableDirectory(), VDirChangeable::insertMutableFile(), VDirChangeable::insertStub(), LandlordThread(), LogAllDirShortIds(), main(), VDirChangeable::makeEntryImmutable(), VDirChangeable::makeIndexMutable(), VDirChangeable::reallyDelete(), VestaSource::recoveryDone(), VDirChangeable::renameTo(), RenewShortIdBlock(), VDirChangeable::setIndexMaster(), VDirChangeable::setTimestamp(), VSAtomic(), write_one_entry(), and VestaSource::writeAttrib().
Here is the call graph for this function:

Here is the caller graph for this function:

| void VestaLog::abort | ( | ) | throw (Error) |
Definition at line 959 of file VestaLog.C.
References VestaLogPrivate::bad, VestaLogPrivate::commPhy, VestaLogPrivate::commPocketPhy, VestaLogPrivate::commSeq, VestaLogPrivate::commUsePocket, VestaLogPrivate::cur, VestaLogPrivate::curLen, VestaLogPrivate::curSeq, VLogBlock::data, VestaLogPrivate::eraseUncommitted(), Basics::errno_Text(), VestaLogPrivate::fd, VestaLogPrivate::fd2, VLogBlock::data_block::getLen(), VestaLogPrivate::logging, VestaLogPrivate::nesting, VLogBlock::phy, VLogBlock::pocketPhy, read(), VestaLogPrivate::ready, VestaLogPrivate::state, VestaLogPrivate::usePocket, and vlp.
Referenced by main().
Here is the call graph for this function:

Here is the caller graph for this function:

| std::fstream* VestaLog::checkpointBegin | ( | std::ios::openmode | mode = std::ios::out |
) | throw (Error) |
Referenced by EmptyPKLog::CheckpointBegin(), CheckpointServer(), CacheS::ChkptGraphLog(), CacheS::CleanCacheLog(), main(), and CacheS::ResetWeededMPKs().
Here is the caller graph for this function:

| void VestaLog::checkpointEnd | ( | ) | throw (Error) |
Definition at line 1113 of file VestaLog.C.
References VestaLogPrivate::bad, VestaLogPrivate::bakckp, Text::cchars(), VestaLogPrivate::ccVersion, VestaLogPrivate::ccVersion2, VestaLogPrivate::checkpointing, FS::FdStreamBase::close(), COPY_SIZE, VestaLogPrivate::directory, VestaLogPrivate::directory2, Basics::errno_Text(), FS::FdStreamBase::fd(), NEW_CONSTR, PathnameSep, VestaLogPrivate::ready, VestaLogPrivate::state, VestaLogPrivate::version, and vlp.
Referenced by EmptyPKLog::CheckpointEnd(), CheckpointServer(), CacheS::CleanCacheLog(), main(), and CacheS::ResetWeededMPKs().
Here is the call graph for this function:

Here is the caller graph for this function:

| void VestaLog::checkpointAbort | ( | ) | throw (Error) |
Definition at line 1229 of file VestaLog.C.
References Text::cchars(), VestaLogPrivate::ccVersion, VestaLogPrivate::checkpointing, VestaLogPrivate::directory, PathnameSep, VestaLogPrivate::ready, VestaLogPrivate::state, VestaLogPrivate::version, and vlp.
Referenced by CacheS::AbortGraphLogChkpt(), and main().
Here is the call graph for this function:

Here is the caller graph for this function:

| std::fstream* VestaLog::checkpointResume | ( | std::ios::openmode | mode = std::ios::out|std::ios::trunc |
) | throw (Error) |
| void VestaLog::prune | ( | int | ckpkeep, | |
| bool | logkeep = false, |
|||
| bool | prunebak = true | |||
| ) | throw (Error) |
Definition at line 1379 of file VestaLog.C.
References VestaLogPrivate::bad, and VestaLogPrivate::initial.
Referenced by EmptyPKLog::CheckpointEnd(), CacheS::CleanCacheLog(), main(), and CacheS::ResetWeededMPKs().
Here is the caller graph for this function:

| void VestaLog::close | ( | ) | throw () |
Definition at line 1401 of file VestaLog.C.
References VestaLogPrivate::bad, VestaLogPrivate::cur, VestaLogPrivate::directory, VestaLogPrivate::fd, VestaLogPrivate::fd2, VestaLogPrivate::free, VestaLogPrivate::initial, VestaLogPrivate::last, VestaLogPrivate::lockfd, VestaLogPrivate::lockfd2, VestaLogPrivate::logging, VLogBlock::next, VestaLogPrivate::pocket, VestaLogPrivate::ready, VestaLogPrivate::recovered, VestaLogPrivate::recovering, VestaLogPrivate::state, and vlp.
Referenced by VestaLogSeq::Close(), main(), nextLog(), and EmptyPKLog::~EmptyPKLog().
Here is the caller graph for this function:

VestaLogPrivate* VestaLog::vlp [private] |
Definition at line 383 of file VestaLog.H.
Referenced by abort(), checkpointAbort(), checkpointEnd(), close(), commit(), eof(), loggingBegin(), logVersion(), nesting(), nextLog(), openCheckpoint(), start(), and VestaLog().
1.5.1