|
xrootd
|
#include <XrdCnsLogFile.hh>

Public Member Functions | |
| int | Add (XrdCnsLogRec *Rec, int doSync=1) |
| int | Commit () |
| int | Eol () |
| const char * | FName () |
| char * | getLog (int &Dlen) |
| XrdCnsLogRec * | getRec () |
| int | Open (int aBuff=1, off_t thePos=0) |
| XrdCnsLogFile * | Subscribe (const char *Path, int cNum) |
| int | Unlink () |
| XrdCnsLogFile (const char *Path, int cnum=0, int Wait=1) | |
| ~XrdCnsLogFile () | |
Static Public Member Functions | |
| static void | maxRecs (int nRecs) |
Public Attributes | |
| XrdCnsLogFile * | Next |
Private Member Functions | |
| int | Read (char *buff, int blen) |
Private Attributes | |
| XrdSysMutex | logMutex |
| XrdSysSemaphore | logSem |
| XrdSysSemaphore | synSem |
| XrdCnsLogFile * | subNext |
| XrdCnsLogRec | Rec |
| char * | logBuff |
| char * | logNext |
| char * | logFN |
| int | logFD |
| int | logRdr |
| int | logWait |
| int | logOffset |
| int | recOffset |
Static Private Attributes | |
| static int | logRMax = 1024 |
| static int | logBMax = 1024 * sizeof(XrdCnsLogRec) |
| XrdCnsLogFile::XrdCnsLogFile | ( | const char * | Path, |
| int | cnum = 0, |
||
| int | Wait = 1 |
||
| ) | [inline] |
| XrdCnsLogFile::~XrdCnsLogFile | ( | ) |
References close.
| int XrdCnsLogFile::Add | ( | XrdCnsLogRec * | Rec, |
| int | doSync = 1 |
||
| ) |
References XrdSysError::Emsg(), fdatasync(), logSem, XrdCnsLogRec::MinSize, XrdCns::MLog, XrdSysSemaphore::Post(), XrdCnsLogRec::Record(), XrdCnsLogRec::setLen(), subNext, and write().
Referenced by XrdCnsInventory::Conduct(), XrdCnsInventory::Init(), XrdCnsLogServer::Run(), and XrdCnsInventory::Xref().
| int XrdCnsLogFile::Commit | ( | ) |
References XrdSysError::Emsg(), fdatasync(), XrdCns::MLog, XrdCnsLogRec::OffDone, and pwrite().
Referenced by XrdCnsLogClient::Run().
| int XrdCnsLogFile::Eol | ( | ) |
References XrdCnsLogRec::DLen(), XrdSysError::Emsg(), logSem, logWait, XrdCnsLogRec::lrEOL, XrdCnsLogRec::MinSize, XrdCns::MLog, XrdSysSemaphore::Post(), subNext, synSem, and write().
Referenced by XrdCnsLogServer::Init(), XrdCnsLogClient::Manifest(), and XrdCnsLogServer::Run().
| const char* XrdCnsLogFile::FName | ( | ) | [inline] |
References logFN.
Referenced by XrdCnsLogClient::Archive(), and XrdCnsLogClient::Manifest().
| char* XrdCnsLogFile::getLog | ( | int & | Dlen | ) | [inline] |
References logBuff, and logNext.
Referenced by XrdCnsLogClient::Archive().
| XrdCnsLogRec * XrdCnsLogFile::getRec | ( | ) |
References XrdSysError::Emsg(), XrdCnsLogRec::FixDLen, XrdCnsLogRec::MinSize, XrdCns::MLog, and XrdCnsLogRec::Record().
Referenced by XrdCnsLogClient::Run().
| static void XrdCnsLogFile::maxRecs | ( | int | nRecs | ) | [inline, static] |
References logBMax, and logRMax.
Referenced by XrdCnsLogServer::Init().
| int XrdCnsLogFile::Open | ( | int | aBuff = 1, |
| off_t | thePos = 0 |
||
| ) |
References close, XrdSysError::Emsg(), fstat(), lseek(), XrdCns::MLog, open(), S_IRGRP, S_IROTH, S_IRUSR, S_IWUSR, and stat().
Referenced by XrdCnsLogServer::Init(), XrdCnsLogClient::Manifest(), and XrdCnsLogClient::Run().
| int XrdCnsLogFile::Read | ( | char * | buff, |
| int | blen | ||
| ) | [private] |
References XrdSysError::Emsg(), XrdCns::MLog, and pread().
| XrdCnsLogFile * XrdCnsLogFile::Subscribe | ( | const char * | Path, |
| int | cNum | ||
| ) |
References XrdSysError::Emsg(), logWait, XrdCns::MLog, subNext, synSem, and XrdSysSemaphore::Wait().
Referenced by XrdCnsLogClient::Activate().
| int XrdCnsLogFile::Unlink | ( | ) |
References XrdSysError::Emsg(), XrdCns::MLog, and unlink().
Referenced by XrdCnsLogServer::Run(), and XrdCnsLogClient::Run().
int XrdCnsLogFile::logBMax = 1024 * sizeof(XrdCnsLogRec) [static, private] |
Referenced by maxRecs().
char* XrdCnsLogFile::logBuff [private] |
Referenced by getLog().
int XrdCnsLogFile::logFD [private] |
char* XrdCnsLogFile::logFN [private] |
Referenced by FName().
XrdSysMutex XrdCnsLogFile::logMutex [private] |
char* XrdCnsLogFile::logNext [private] |
Referenced by getLog().
int XrdCnsLogFile::logOffset [private] |
int XrdCnsLogFile::logRdr [private] |
int XrdCnsLogFile::logRMax = 1024 [static, private] |
Referenced by maxRecs().
XrdSysSemaphore XrdCnsLogFile::logSem [private] |
int XrdCnsLogFile::logWait [private] |
Referenced by Eol(), and Subscribe().
Referenced by XrdCnsLogClient::Activate(), XrdCnsLogClient::Init(), XrdCnsLogClient::Manifest(), and XrdCnsLogClient::Run().
XrdCnsLogRec XrdCnsLogFile::Rec [private] |
int XrdCnsLogFile::recOffset [private] |
XrdCnsLogFile* XrdCnsLogFile::subNext [private] |
Referenced by Add(), Eol(), and Subscribe().
XrdSysSemaphore XrdCnsLogFile::synSem [private] |
Referenced by Eol(), and Subscribe().
1.7.3