#include <XrdOfsEvr.hh>
Public Member Functions | |
void | flushEvents () |
int | Init (XrdSysError *eObj, XrdCmsClient *trg=0) |
void | recvEvents () |
void | Wait4Event (const char *path, XrdOucErrInfo *einfo) |
void | Work4Event (theClient *Client) |
XrdOfsEvr () | |
~XrdOfsEvr () | |
Private Member Functions | |
void | eventStage () |
void | sendEvent (theEvent *ep) |
Private Attributes | |
XrdSysMutex | myMutex |
XrdSysSemaphore | mySem |
XrdOucStream | eventFIFO |
XrdSysError * | eDest |
XrdCmsClient * | Balancer |
theClient * | deferQ |
int | runQ |
int | msgFD |
XrdOucHash< theEvent > | Events |
Static Private Attributes | |
static const int | maxLife = (8*60*60) |
Classes | |
class | theClient |
struct | theEvent |
Definition at line 24 of file XrdOfsEvr.hh.
XrdOfsEvr::XrdOfsEvr | ( | ) | [inline] |
XrdOfsEvr::~XrdOfsEvr | ( | ) |
Definition at line 60 of file XrdOfsEvr.cc.
References XrdOucStream::Close(), eventFIFO, XrdSysMutex::Lock(), myMutex, and XrdSysMutex::UnLock().
void XrdOfsEvr::flushEvents | ( | ) |
Definition at line 74 of file XrdOfsEvr.cc.
References deferQ, Events, XrdSysMutex::Lock(), maxLife, myMutex, mySem, XrdOfsEvr::theClient::Next, XrdOfsEvr::theClient::Path, runQ, XrdSysMutex::UnLock(), XrdSysSemaphore::Wait(), XrdSysTimer::Wait(), and XrdOfsScrubScan().
Referenced by XrdOfsEvFlush().
int XrdOfsEvr::Init | ( | XrdSysError * | eObj, | |
XrdCmsClient * | trg = 0 | |||
) |
Definition at line 117 of file XrdOfsEvr.cc.
References Balancer, XrdNetSocket::Create(), XrdNetSocket::Detach(), eDest, XrdSysError::Emsg(), XrdOucEnv::Export(), getenv(), msgFD, n, p, XrdSysThread::Run(), strcpy(), XRDNET_FIFO, XrdOfsEvFlush(), and XrdOfsEvRecv().
Referenced by XrdOfs::Configure().
void XrdOfsEvr::recvEvents | ( | ) |
Definition at line 173 of file XrdOfsEvr.cc.
References XrdOucStream::Attach(), DEBUG, eDest, XrdSysError::Emsg(), EPNAME, eventFIFO, eventStage(), XrdOucStream::GetLine(), XrdOucStream::GetToken(), msgFD, and tident.
Referenced by XrdOfsEvRecv().
void XrdOfsEvr::Wait4Event | ( | const char * | path, | |
XrdOucErrInfo * | einfo | |||
) |
Definition at line 198 of file XrdOfsEvr.cc.
References XrdOucErrInfo::setErrCB().
Referenced by XrdOfsFile::open().
void XrdOfsEvr::Work4Event | ( | theClient * | Client | ) |
Definition at line 212 of file XrdOfsEvr.cc.
References XrdOfsEvr::theEvent::aClient, Events, XrdOfsEvr::theClient::evtCB, XrdOfsEvr::theClient::evtCBarg, XrdOfsEvr::theEvent::Happened, XrdSysMutex::Lock(), maxLife, myMutex, XrdOfsEvr::theClient::Next, XrdOfsEvr::theClient::Path, XrdOucEICB::Same(), sendEvent(), and XrdSysMutex::UnLock().
Referenced by XrdOfsEvr::theClient::Done().
void XrdOfsEvr::eventStage | ( | ) | [private] |
Definition at line 251 of file XrdOfsEvr.cc.
References XrdOfsEvr::theEvent::aClient, XrdOfsStats::Add(), XrdCmsClient::Added(), Balancer, XrdOfsStats::Data, eDest, eMsg, XrdSysError::Emsg(), eventFIFO, Events, XrdOfsEvr::theEvent::finalMsg, XrdOfsEvr::theEvent::finalRC, XrdOucStream::GetToken(), XrdOfsEvr::theEvent::Happened, XrdSysMutex::Lock(), maxLife, myMutex, XrdOfsStats::StatsData::numSeventOK, OfsStats, XrdCmsClient::Removed(), sendEvent(), and XrdSysMutex::UnLock().
Referenced by recvEvents().
void XrdOfsEvr::sendEvent | ( | theEvent * | ep | ) | [private] |
Definition at line 314 of file XrdOfsEvr.cc.
References XrdOfsEvr::theEvent::aClient, deferQ, XrdOucEICB::Done(), XrdOfsEvr::theClient::evtCB, XrdOfsEvr::theClient::evtCBarg, XrdOfsEvr::theEvent::finalMsg, XrdOfsEvr::theEvent::finalRC, mySem, XrdOfsEvr::theClient::Next, XrdSysSemaphore::Post(), runQ, XrdOucErrInfo::setErrInfo(), SFS_ERROR, SFS_OK, and XrdOfsEvr::theClient::User.
Referenced by eventStage(), and Work4Event().
const int XrdOfsEvr::maxLife = (8*60*60) [static, private] |
Definition at line 87 of file XrdOfsEvr.hh.
Referenced by eventStage(), flushEvents(), and Work4Event().
XrdSysMutex XrdOfsEvr::myMutex [private] |
Definition at line 88 of file XrdOfsEvr.hh.
Referenced by eventStage(), flushEvents(), Work4Event(), and ~XrdOfsEvr().
XrdSysSemaphore XrdOfsEvr::mySem [private] |
XrdOucStream XrdOfsEvr::eventFIFO [private] |
Definition at line 90 of file XrdOfsEvr.hh.
Referenced by eventStage(), recvEvents(), and ~XrdOfsEvr().
XrdSysError* XrdOfsEvr::eDest [private] |
XrdCmsClient* XrdOfsEvr::Balancer [private] |
theClient* XrdOfsEvr::deferQ [private] |
Definition at line 93 of file XrdOfsEvr.hh.
Referenced by flushEvents(), sendEvent(), and XrdOfsEvr().
int XrdOfsEvr::runQ [private] |
Definition at line 94 of file XrdOfsEvr.hh.
Referenced by flushEvents(), sendEvent(), and XrdOfsEvr().
int XrdOfsEvr::msgFD [private] |
XrdOucHash<theEvent> XrdOfsEvr::Events [private] |
Definition at line 97 of file XrdOfsEvr.hh.
Referenced by eventStage(), flushEvents(), and Work4Event().