xrootd
|
#include <XrdOfsEvr.hh>
Classes | |
class | theClient |
struct | theEvent |
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) |
XrdOfsEvr::~XrdOfsEvr | ( | ) |
References XrdOucStream::Close(), eventFIFO, XrdSysMutex::Lock(), myMutex, and XrdSysMutex::UnLock().
void XrdOfsEvr::eventStage | ( | ) | [private] |
References XrdOfsEvr::theEvent::aClient, XrdOucHash< T >::Add(), XrdOfsStats::Add(), XrdCmsClient::Added(), Balancer, XrdOfsStats::Data, eDest, XrdSysError::Emsg(), eMsg, eventFIFO, Events, XrdOfsEvr::theEvent::finalMsg, XrdOfsEvr::theEvent::finalRC, XrdOucHash< T >::Find(), XrdOucStream::GetToken(), XrdOfsEvr::theEvent::Happened, XrdSysMutex::Lock(), maxLife, myMutex, XrdOfsStats::StatsData::numSeventOK, XrdCmsClient::Removed(), sendEvent(), and XrdSysMutex::UnLock().
Referenced by recvEvents().
void XrdOfsEvr::flushEvents | ( | ) |
References XrdOucHash< T >::Apply(), deferQ, XrdOucHash< T >::Del(), 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 |
||
) |
References Balancer, XrdNetSocket::Create(), XrdNetSocket::Detach(), eDest, XrdSysError::Emsg(), XrdOucEnv::Export(), msgFD, XrdSysThread::Run(), XRDNET_FIFO, XrdOfsEvFlush(), and XrdOfsEvRecv().
Referenced by XrdOfs::Configure().
void XrdOfsEvr::recvEvents | ( | ) |
References XrdOucStream::Attach(), DEBUG, eDest, XrdSysError::Emsg(), EPNAME, eventFIFO, eventStage(), XrdOucStream::GetLine(), XrdOucStream::GetToken(), msgFD, and tident.
Referenced by XrdOfsEvRecv().
void XrdOfsEvr::sendEvent | ( | theEvent * | ep | ) | [private] |
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().
void XrdOfsEvr::Wait4Event | ( | const char * | path, |
XrdOucErrInfo * | einfo | ||
) |
References XrdOucErrInfo::setErrCB().
Referenced by XrdOfsFile::open().
void XrdOfsEvr::Work4Event | ( | theClient * | Client | ) |
References XrdOfsEvr::theEvent::aClient, XrdOucHash< T >::Add(), Events, XrdOfsEvr::theClient::evtCB, XrdOfsEvr::theClient::evtCBarg, XrdOucHash< T >::Find(), XrdOfsEvr::theEvent::Happened, XrdSysMutex::Lock(), maxLife, myMutex, XrdOfsEvr::theClient::Next, XrdOfsEvr::theClient::Path, XrdOucEICB::Same(), sendEvent(), and XrdSysMutex::UnLock().
Referenced by XrdOfsEvr::theClient::Done().
XrdCmsClient* XrdOfsEvr::Balancer [private] |
Referenced by eventStage(), and Init().
theClient* XrdOfsEvr::deferQ [private] |
Referenced by flushEvents(), sendEvent(), and XrdOfsEvr().
XrdSysError* XrdOfsEvr::eDest [private] |
Referenced by eventStage(), Init(), and recvEvents().
XrdOucStream XrdOfsEvr::eventFIFO [private] |
Referenced by eventStage(), recvEvents(), and ~XrdOfsEvr().
XrdOucHash<theEvent> XrdOfsEvr::Events [private] |
Referenced by eventStage(), flushEvents(), and Work4Event().
const int XrdOfsEvr::maxLife = (8*60*60) [static, private] |
Referenced by eventStage(), flushEvents(), and Work4Event().
int XrdOfsEvr::msgFD [private] |
Referenced by Init(), and recvEvents().
XrdSysMutex XrdOfsEvr::myMutex [private] |
Referenced by eventStage(), flushEvents(), Work4Event(), and ~XrdOfsEvr().
XrdSysSemaphore XrdOfsEvr::mySem [private] |
Referenced by flushEvents(), and sendEvent().
int XrdOfsEvr::runQ [private] |
Referenced by flushEvents(), sendEvent(), and XrdOfsEvr().