#include <XrdCmsClientMan.hh>
Public Member Functions | |
int | delayResp (XrdOucErrInfo &Resp) |
int | isActive () |
XrdCmsClientMan * | nextManager () |
char * | Name () |
char * | NPfx () |
int | Send (char *msg, int mlen=0) |
int | Send (const struct iovec *iov, int iovcnt, int iotot=0) |
void * | Start () |
int | Suspended () |
void | setNext (XrdCmsClientMan *np) |
int | whatsUp (const char *user, const char *path) |
int | waitTime () |
XrdCmsClientMan (char *host, int port, int cw, int nr, int rw, int rd) | |
~XrdCmsClientMan () | |
Static Public Member Functions | |
static void | setConfig (char *cfn) |
Static Public Attributes | |
static char | doDebug |
Private Member Functions | |
int | Hookup () |
int | Receive () |
void | relayResp () |
void | chkStatus () |
void | setStatus () |
Private Attributes | |
XrdSysSemaphore | syncResp |
XrdCmsRespQ | RespQ |
XrdCmsClientMan * | Next |
XrdSysMutex | myData |
XrdLink * | Link |
char * | Host |
char * | HPfx |
int | Port |
int | manMask |
int | dally |
int | Active |
int | Silent |
int | Suspend |
int | RecvCnt |
int | SendCnt |
int | nrMax |
int | maxMsgID |
int | repWait |
int | repWMax |
int | minDelay |
int | maxDelay |
int | qTime |
int | chkCount |
time_t | lastUpdt |
time_t | lastTOut |
XrdCms::CmsRRHdr | Response |
XrdNetBuffer * | NetBuff |
Static Private Attributes | |
static XrdSysMutex | manMutex |
static XrdNetBufferQ | BuffQ |
static char * | ConfigFN |
static const int | chkVal = 256 |
Definition at line 30 of file XrdCmsClientMan.hh.
XrdCmsClientMan::XrdCmsClientMan | ( | char * | host, | |
int | port, | |||
int | cw, | |||
int | nr, | |||
int | rw, | |||
int | rd | |||
) |
Definition at line 50 of file XrdCmsClientMan.cc.
References Active, XrdNetBufferQ::Alloc(), BuffQ, chkCount, chkVal, dally, RootCsg::dot(), Host, HPfx, lastTOut, lastUpdt, Link, XrdSysMutex::Lock(), manMask, maxDelay, minDelay, NetBuff, nrMax, Port, RecvCnt, repWait, repWMax, Silent, Suspend, and XrdSysMutex::UnLock().
XrdCmsClientMan::~XrdCmsClientMan | ( | ) |
Definition at line 94 of file XrdCmsClientMan.cc.
References XrdLink::Close(), free(), Host, HPfx, Link, NetBuff, and XrdNetBuffer::Recycle().
int XrdCmsClientMan::delayResp | ( | XrdOucErrInfo & | Resp | ) |
Definition at line 106 of file XrdCmsClientMan.cc.
References XrdCmsRespQ::Add(), XrdCmsResp::Alloc(), EINPROGRESS, XrdSysError::Emsg(), XrdOucErrInfo::getErrInfo(), Host, maxMsgID, XrdSysSemaphore::Post(), XrdCmsRespQ::Purge(), RespQ, XrdFrm::Say(), XrdOucErrInfo::setErrInfo(), and syncResp.
Referenced by XrdCmsFinderRMT::send2Man().
int XrdCmsClientMan::isActive | ( | ) | [inline] |
Definition at line 38 of file XrdCmsClientMan.hh.
References Active.
Referenced by XrdCmsFinderRMT::Inform(), and XrdCmsFinderRMT::SelectManager().
XrdCmsClientMan* XrdCmsClientMan::nextManager | ( | ) | [inline] |
Definition at line 40 of file XrdCmsClientMan.hh.
References Next.
Referenced by XrdCmsFinderRMT::Inform(), XrdCmsFinderRMT::SelectManager(), and XrdCmsFinderRMT::~XrdCmsFinderRMT().
char* XrdCmsClientMan::Name | ( | ) | [inline] |
Definition at line 42 of file XrdCmsClientMan.hh.
References Host.
Referenced by XrdCmsFinderRMT::Prepare().
char* XrdCmsClientMan::NPfx | ( | ) | [inline] |
int XrdCmsClientMan::Send | ( | char * | msg, | |
int | mlen = 0 | |||
) |
Definition at line 149 of file XrdCmsClientMan.cc.
References Active, XrdLink::Close(), Link, XrdSysMutex::Lock(), myData, XrdLink::Send(), SendCnt, and XrdSysMutex::UnLock().
Referenced by XrdCmsFinderRMT::Forward(), XrdCmsFinderRMT::Inform(), XrdCmsFinderRMT::Prepare(), and XrdCmsFinderRMT::send2Man().
int XrdCmsClientMan::Send | ( | const struct iovec * | iov, | |
int | iovcnt, | |||
int | iotot = 0 | |||
) |
Definition at line 177 of file XrdCmsClientMan.cc.
References Active, XrdLink::Close(), Link, XrdSysMutex::Lock(), myData, XrdLink::Send(), SendCnt, and XrdSysMutex::UnLock().
void * XrdCmsClientMan::Start | ( | ) |
Definition at line 203 of file XrdCmsClientMan.cc.
References Active, XrdLink::Close(), dally, XrdSysError::Emsg(), Hookup(), Host, HPfx, XrdCms::kYR_status, XrdCms::kYR_waitresp, Link, XrdSysMutex::Lock(), XrdCms::CmsRRHdr::modifier, myData, NetBuff, Receive(), relayResp(), XrdCmsClientMsg::Reply(), Response, XrdCms::CmsRRHdr::rrCode, XrdFrm::Say(), setStatus(), XrdSysTimer::Snooze(), Suspend, syncResp, XrdSysMutex::UnLock(), and XrdSysSemaphore::Wait().
Referenced by XrdCmsStartManager().
int XrdCmsClientMan::Suspended | ( | ) | [inline] |
Definition at line 50 of file XrdCmsClientMan.hh.
References chkStatus(), and Suspend.
Referenced by XrdCmsFinderRMT::SelectManager(), and XrdCmsFinderRMT::send2Man().
void XrdCmsClientMan::setNext | ( | XrdCmsClientMan * | np | ) | [inline] |
Definition at line 52 of file XrdCmsClientMan.hh.
References Next.
Referenced by XrdCmsFinderRMT::StartManagers().
static void XrdCmsClientMan::setConfig | ( | char * | cfn | ) | [inline, static] |
Definition at line 54 of file XrdCmsClientMan.hh.
References ConfigFN.
Referenced by XrdCmsFinderRMT::Configure().
int XrdCmsClientMan::whatsUp | ( | const char * | user, | |
const char * | path | |||
) |
Definition at line 245 of file XrdCmsClientMan.cc.
References Active, XrdLink::Close(), EPNAME, HPfx, XrdCmsClientMsg::inQ(), lastTOut, Link, XrdSysMutex::Lock(), maxDelay, minDelay, myData, nrMax, qTime, RecvCnt, repWait, repWMax, Silent, Suspend, TRACE, and XrdSysMutex::UnLock().
Referenced by XrdCmsFinderRMT::send2Man().
int XrdCmsClientMan::waitTime | ( | ) | [inline] |
Definition at line 58 of file XrdCmsClientMan.hh.
References repWait.
Referenced by XrdCmsFinderRMT::send2Man().
int XrdCmsClientMan::Hookup | ( | ) | [private] |
Definition at line 289 of file XrdCmsClientMan.cc.
References Active, XrdLink::Bind(), XrdInet::Connect(), dally, DEBUG, doDebug, XrdSysError::Emsg(), EPNAME, Host, XrdSysThread::ID(), lastTOut, Link, XrdSysMutex::Lock(), XrdCmsLogin::Login(), manMask, manMutex, myData, opts, Port, qTime, RecvCnt, repWait, repWMax, XrdFrm::Say(), SendCnt, Silent, XrdSysTimer::Snooze(), sprintf(), Suspend, XrdSysMutex::UnLock(), XRDNET_NOEMSG, and XrdXrootdNetwork.
Referenced by Start().
int XrdCmsClientMan::Receive | ( | ) | [private] |
Definition at line 365 of file XrdCmsClientMan.cc.
References XrdNetBuffer::BuffSize(), XrdNetBuffer::data, DEBUG, XrdNetBuffer::dlen, XrdSysError::Emsg(), EPNAME, Host, Link, XrdLink::Name(), NetBuff, XrdLink::RecvAll(), RecvCnt, Response, and XrdFrm::Say().
Referenced by Start().
void XrdCmsClientMan::relayResp | ( | ) | [private] |
Definition at line 389 of file XrdCmsClientMan.cc.
References XrdNetBufferQ::Alloc(), BuffQ, DEBUG, EPNAME, Host, HPfx, NetBuff, XrdCmsRespQ::Rem(), XrdCmsResp::Reply(), Response, RespQ, and XrdCms::CmsRRHdr::streamid.
Referenced by Start().
void XrdCmsClientMan::chkStatus | ( | ) | [private] |
Definition at line 414 of file XrdCmsClientMan.cc.
References Active, chkCount, chkVal, XrdCms::kYR_update, lastUpdt, Link, XrdSysMutex::Lock(), myData, XrdLink::Send(), and XrdSysMutex::UnLock().
Referenced by Suspended().
void XrdCmsClientMan::setStatus | ( | ) | [private] |
Definition at line 437 of file XrdCmsClientMan.cc.
References DEBUG, XrdSysError::Emsg(), EPNAME, Host, XrdSysMutex::Lock(), XrdCms::CmsRRHdr::modifier, myData, Response, XrdFrm::Say(), Suspend, and XrdSysMutex::UnLock().
Referenced by Start().
char XrdCmsClientMan::doDebug [static] |
Definition at line 34 of file XrdCmsClientMan.hh.
Referenced by XrdCmsFinderRMT::Forward(), Hookup(), XrdCmsFinderRMT::Locate(), XrdCmsFinderRMT::Prepare(), and XrdCmsFinderRMT::Space().
XrdSysMutex XrdCmsClientMan::manMutex [static, private] |
XrdNetBufferQ XrdCmsClientMan::BuffQ [static, private] |
char * XrdCmsClientMan::ConfigFN [static, private] |
const int XrdCmsClientMan::chkVal = 256 [static, private] |
XrdSysSemaphore XrdCmsClientMan::syncResp [private] |
XrdCmsRespQ XrdCmsClientMan::RespQ [private] |
XrdCmsClientMan* XrdCmsClientMan::Next [private] |
XrdSysMutex XrdCmsClientMan::myData [private] |
Definition at line 79 of file XrdCmsClientMan.hh.
Referenced by chkStatus(), Hookup(), Send(), setStatus(), Start(), and whatsUp().
XrdLink* XrdCmsClientMan::Link [private] |
Definition at line 80 of file XrdCmsClientMan.hh.
Referenced by chkStatus(), Hookup(), Receive(), Send(), Start(), whatsUp(), XrdCmsClientMan(), and ~XrdCmsClientMan().
char* XrdCmsClientMan::Host [private] |
Definition at line 81 of file XrdCmsClientMan.hh.
Referenced by delayResp(), Hookup(), Name(), Receive(), relayResp(), setStatus(), Start(), XrdCmsClientMan(), and ~XrdCmsClientMan().
char* XrdCmsClientMan::HPfx [private] |
Definition at line 82 of file XrdCmsClientMan.hh.
Referenced by NPfx(), relayResp(), Start(), whatsUp(), XrdCmsClientMan(), and ~XrdCmsClientMan().
int XrdCmsClientMan::Port [private] |
int XrdCmsClientMan::manMask [private] |
int XrdCmsClientMan::dally [private] |
Definition at line 85 of file XrdCmsClientMan.hh.
Referenced by Hookup(), Start(), and XrdCmsClientMan().
int XrdCmsClientMan::Active [private] |
Definition at line 86 of file XrdCmsClientMan.hh.
Referenced by chkStatus(), Hookup(), isActive(), Send(), Start(), whatsUp(), and XrdCmsClientMan().
int XrdCmsClientMan::Silent [private] |
Definition at line 87 of file XrdCmsClientMan.hh.
Referenced by Hookup(), whatsUp(), and XrdCmsClientMan().
int XrdCmsClientMan::Suspend [private] |
Definition at line 88 of file XrdCmsClientMan.hh.
Referenced by Hookup(), setStatus(), Start(), Suspended(), whatsUp(), and XrdCmsClientMan().
int XrdCmsClientMan::RecvCnt [private] |
Definition at line 89 of file XrdCmsClientMan.hh.
Referenced by Hookup(), Receive(), whatsUp(), and XrdCmsClientMan().
int XrdCmsClientMan::SendCnt [private] |
int XrdCmsClientMan::nrMax [private] |
int XrdCmsClientMan::maxMsgID [private] |
int XrdCmsClientMan::repWait [private] |
Definition at line 93 of file XrdCmsClientMan.hh.
Referenced by Hookup(), waitTime(), whatsUp(), and XrdCmsClientMan().
int XrdCmsClientMan::repWMax [private] |
Definition at line 94 of file XrdCmsClientMan.hh.
Referenced by Hookup(), whatsUp(), and XrdCmsClientMan().
int XrdCmsClientMan::minDelay [private] |
int XrdCmsClientMan::maxDelay [private] |
int XrdCmsClientMan::qTime [private] |
int XrdCmsClientMan::chkCount [private] |
time_t XrdCmsClientMan::lastUpdt [private] |
time_t XrdCmsClientMan::lastTOut [private] |
Definition at line 100 of file XrdCmsClientMan.hh.
Referenced by Hookup(), whatsUp(), and XrdCmsClientMan().
XrdCms::CmsRRHdr XrdCmsClientMan::Response [private] |
Definition at line 101 of file XrdCmsClientMan.hh.
Referenced by Receive(), relayResp(), setStatus(), and Start().
XrdNetBuffer* XrdCmsClientMan::NetBuff [private] |
Definition at line 102 of file XrdCmsClientMan.hh.
Referenced by Receive(), relayResp(), Start(), XrdCmsClientMan(), and ~XrdCmsClientMan().