|
xrootd
|
#include <XrdOfsEvs.hh>

Public Types | |
| enum | Event { All = 0x7fffff00, None = 0x00000000, Chmod = 0x00000100, Closer = 0x00000201, Closew = 0x00000402, Close = 0x00000600, Create = 0x00000803, Fwrite = 0x00001004, Mkdir = 0x00002005, Mv = 0x00004006, Openr = 0x00008007, Openw = 0x00010008, Open = 0x00018000, Rm = 0x00020009, Rmdir = 0x0004000a, Trunc = 0x0008000b, nCount = 12, Mask = 0X000000ff, enMask = 0x7fffff00 } |
Public Member Functions | |
| int | Enabled (Event theEvents) |
| int | maxSmsg () |
| int | maxLmsg () |
| void | Notify (Event eNum, XrdOfsEvsInfo &Info) |
| const char * | Prog () |
| void | sendEvents (void) |
| int | Start (XrdSysError *eobj) |
| XrdOfsEvs (Event theEvents, const char *Target, int minq=90, int maxq=10) | |
| ~XrdOfsEvs () | |
Static Public Member Functions | |
| static int | Parse (XrdSysError &Eroute, Event eNum, char *mText) |
Static Public Attributes | |
| static const int | minMsgSize = 1360 |
| static const int | maxMsgSize = 2384 |
Private Member Functions | |
| const char * | eName (int eNum) |
| int | Feed (const char *data, int dlen) |
| XrdOfsEvsMsg * | getMsg (int bigmsg) |
| void | retMsg (XrdOfsEvsMsg *tp) |
Private Attributes | |
| pthread_t | tid |
| char * | theTarget |
| Event | enEvents |
| XrdSysError * | eDest |
| XrdOucProg * | theProg |
| XrdSysMutex | qMut |
| XrdSysSemaphore | qSem |
| XrdOfsEvsMsg * | msgFirst |
| XrdOfsEvsMsg * | msgLast |
| XrdSysMutex | fMut |
| XrdOfsEvsMsg * | msgFreeMax |
| XrdOfsEvsMsg * | msgFreeMin |
| int | endIT |
| int | msgFD |
| int | numMax |
| int | maxMax |
| int | numMin |
| int | maxMin |
Static Private Attributes | |
| static XrdOfsEvsFormat | MsgFmt [XrdOfsEvs::nCount] |
| enum XrdOfsEvs::Event |
| XrdOfsEvs::XrdOfsEvs | ( | Event | theEvents, |
| const char * | Target, | ||
| int | minq = 90, |
||
| int | maxq = 10 |
||
| ) |
References enEvents, enMask, endIT, theTarget, eDest, theProg, maxMin, maxMax, msgFirst, msgLast, msgFreeMax, msgFreeMin, numMax, numMin, tid, msgFD, MsgFmt, Chmod, Mask, XrdOfsEvsFormat::Def(), XrdOfsEvsFormat::cvtMode, XrdOfsEvsInfo::evTID, XrdOfsEvsInfo::evFMODE, XrdOfsEvsInfo::evLFN1, Closer, XrdOfsEvsFormat::Null, Closew, Create, Mkdir, Mv, XrdOfsEvsInfo::evLFN2, Openr, Openw, Rm, Rmdir, Trunc, XrdOfsEvsFormat::cvtFSize, XrdOfsEvsInfo::evFSIZE, and Fwrite.
| XrdOfsEvs::~XrdOfsEvs | ( | ) |
References endIT, tid, XrdSysThread::Kill(), qMut, XrdSysMutex::Lock(), msgFirst, XrdOfsEvsMsg::next, theTarget, msgFD, close, theProg, XrdSysMutex::UnLock(), fMut, msgFreeMax, and msgFreeMin.
| int XrdOfsEvs::Enabled | ( | Event | theEvents | ) | [inline] |
| const char * XrdOfsEvs::eName | ( | int | eNum | ) | [private] |
| int XrdOfsEvs::Feed | ( | const char * | data, |
| int | dlen | ||
| ) | [private] |
References write(), msgFD, eDest, XrdSysError::Emsg(), and theTarget.
Referenced by sendEvents().
| XrdOfsEvsMsg * XrdOfsEvs::getMsg | ( | int | bigmsg | ) | [private] |
References fMut, XrdSysMutex::Lock(), msgFreeMax, XrdOfsEvsMsg::next, maxMsgSize, msgFreeMin, minMsgSize, numMax, numMin, maxMax, maxMin, XrdOfsEvsMsg::text, and XrdSysMutex::UnLock().
Referenced by Notify().
| int XrdOfsEvs::maxLmsg | ( | ) | [inline] |
References maxMax.
Referenced by XrdOfs::Config_Display().
| int XrdOfsEvs::maxSmsg | ( | ) | [inline] |
References maxMin.
Referenced by XrdOfs::Config_Display().
| void XrdOfsEvs::Notify | ( | Event | eNum, |
| XrdOfsEvsInfo & | Info | ||
| ) |
References Mv, maxMsgSize, minMsgSize, Mask, nCount, MsgFmt, XrdOfsEvsFormat::Flags, XrdOfsEvsFormat::cvtMode, XrdOfsEvsInfo::FMode(), S_IAMB, XrdOfsEvsInfo::Set(), XrdOfsEvsInfo::evFMODE, XrdOfsEvsFormat::cvtFSize, XrdOfsEvsInfo::FSize(), XrdOfsEvsInfo::evFSIZE, getMsg(), eDest, XrdSysError::Emsg(), eName(), XrdOfsEvsMsg::tlen, XrdOfsEvsFormat::SNP(), XrdOfsEvsMsg::text, XrdOfsEvsMsg::next, qMut, XrdSysMutex::Lock(), msgLast, msgFirst, XrdSysMutex::UnLock(), qSem, and XrdSysSemaphore::Post().
Referenced by XrdOfsFile::open(), XrdOfsFile::close(), XrdOfsFile::GenFWEvent(), XrdOfs::chmod(), XrdOfs::mkdir(), XrdOfs::remove(), XrdOfs::rename(), XrdOfs::truncate(), and XrdOfs::Unpersist().
| int XrdOfsEvs::Parse | ( | XrdSysError & | Eroute, |
| XrdOfsEvs::Event | eNum, | ||
| char * | mText | ||
| ) | [static] |
References XrdOfsEvsInfo::evARGS, index(), XrdSysError::Emsg(), XrdSysError::Say(), Mask, MsgFmt, and XrdOfsEvsFormat::Set().
Referenced by XrdOfs::xnmsg().
| const char* XrdOfsEvs::Prog | ( | ) | [inline] |
References theTarget.
Referenced by XrdOfs::Config_Display().
| void XrdOfsEvs::retMsg | ( | XrdOfsEvsMsg * | tp | ) | [private] |
References fMut, XrdSysMutex::Lock(), XrdOfsEvsMsg::isBig, numMax, maxMax, XrdOfsEvsMsg::next, msgFreeMax, numMin, maxMin, msgFreeMin, and XrdSysMutex::UnLock().
Referenced by sendEvents().
| void XrdOfsEvs::sendEvents | ( | void | ) |
References qSem, XrdSysSemaphore::Wait(), qMut, XrdSysMutex::Lock(), endIT, msgFirst, XrdOfsEvsMsg::next, msgLast, XrdSysMutex::UnLock(), theProg, Feed(), XrdOfsEvsMsg::text, XrdOfsEvsMsg::tlen, XrdOucProg::Feed(), and retMsg().
Referenced by XrdOfsEvsSend().
| int XrdOfsEvs::Start | ( | XrdSysError * | eobj | ) |
References eDest, theTarget, XrdNetSocket::Create(), XRDNET_FIFO, msgFD, XrdNetSocket::Detach(), theProg, XrdOucProg::Setup(), XrdOucProg::Start(), XrdSysError::Emsg(), XrdSysThread::Run(), tid, and XrdOfsEvsSend().
Referenced by XrdOfs::Configure().
XrdSysError* XrdOfsEvs::eDest [private] |
Referenced by XrdOfsEvs(), Notify(), Start(), and Feed().
int XrdOfsEvs::endIT [private] |
Referenced by XrdOfsEvs(), ~XrdOfsEvs(), and sendEvents().
Event XrdOfsEvs::enEvents [private] |
Referenced by XrdOfsEvs(), and Enabled().
XrdSysMutex XrdOfsEvs::fMut [private] |
Referenced by ~XrdOfsEvs(), getMsg(), and retMsg().
int XrdOfsEvs::maxMax [private] |
Referenced by XrdOfsEvs(), getMsg(), retMsg(), and maxLmsg().
int XrdOfsEvs::maxMin [private] |
Referenced by XrdOfsEvs(), getMsg(), retMsg(), and maxSmsg().
const int XrdOfsEvs::maxMsgSize = 2384 [static] |
const int XrdOfsEvs::minMsgSize = 1360 [static] |
int XrdOfsEvs::msgFD [private] |
Referenced by XrdOfsEvs(), ~XrdOfsEvs(), Start(), and Feed().
XrdOfsEvsMsg* XrdOfsEvs::msgFirst [private] |
Referenced by XrdOfsEvs(), ~XrdOfsEvs(), Notify(), and sendEvents().
XrdOfsEvsFormat XrdOfsEvs::MsgFmt [static, private] |
Referenced by XrdOfsEvs(), Notify(), and Parse().
XrdOfsEvsMsg* XrdOfsEvs::msgFreeMax [private] |
Referenced by XrdOfsEvs(), ~XrdOfsEvs(), getMsg(), and retMsg().
XrdOfsEvsMsg* XrdOfsEvs::msgFreeMin [private] |
Referenced by XrdOfsEvs(), ~XrdOfsEvs(), getMsg(), and retMsg().
XrdOfsEvsMsg* XrdOfsEvs::msgLast [private] |
Referenced by XrdOfsEvs(), Notify(), and sendEvents().
int XrdOfsEvs::numMax [private] |
Referenced by XrdOfsEvs(), getMsg(), and retMsg().
int XrdOfsEvs::numMin [private] |
Referenced by XrdOfsEvs(), getMsg(), and retMsg().
XrdSysMutex XrdOfsEvs::qMut [private] |
Referenced by ~XrdOfsEvs(), Notify(), and sendEvents().
XrdSysSemaphore XrdOfsEvs::qSem [private] |
Referenced by Notify(), and sendEvents().
XrdOucProg* XrdOfsEvs::theProg [private] |
Referenced by XrdOfsEvs(), ~XrdOfsEvs(), sendEvents(), and Start().
char* XrdOfsEvs::theTarget [private] |
Referenced by XrdOfsEvs(), ~XrdOfsEvs(), Start(), Feed(), and Prog().
pthread_t XrdOfsEvs::tid [private] |
Referenced by XrdOfsEvs(), ~XrdOfsEvs(), and Start().
1.7.5