xrootd
|
#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 = 0 |
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 = 0 |
static const int | chkVal = 256 |
XrdCmsClientMan::XrdCmsClientMan | ( | char * | host, |
int | port, | ||
int | cw, | ||
int | nr, | ||
int | rw, | ||
int | rd | ||
) |
XrdCmsClientMan::~XrdCmsClientMan | ( | ) |
References XrdLink::Close(), Host, HPfx, Link, NetBuff, and XrdNetBuffer::Recycle().
void XrdCmsClientMan::chkStatus | ( | ) | [private] |
References Active, chkCount, chkVal, XrdCms::kYR_update, lastUpdt, Link, XrdSysMutex::Lock(), myData, XrdLink::Send(), and XrdSysMutex::UnLock().
Referenced by Suspended().
int XrdCmsClientMan::delayResp | ( | XrdOucErrInfo & | Resp | ) |
int XrdCmsClientMan::Hookup | ( | ) | [private] |
References Active, XrdLink::Bind(), XrdLink::Close(), XrdInet::Connect(), dally, DEBUG, doDebug, EPNAME, XrdCms::CmsLoginData::HoldTime, Host, XrdSysThread::ID(), lastTOut, Link, XrdSysMutex::Lock(), XrdCmsLogin::Login(), manMask, manMutex, XrdCms::CmsLoginData::Mode, myData, opts, Port, qTime, RecvCnt, repWait, repWMax, Say, SendCnt, Silent, XrdSysTimer::Snooze(), Suspend, XrdSysMutex::UnLock(), XrdCms::CmsLoginData::Version, XRDNET_NOEMSG, and XrdXrootdNetwork.
Referenced by Start().
int XrdCmsClientMan::isActive | ( | ) | [inline] |
References Active.
Referenced by XrdCmsFinderRMT::Inform(), and XrdCmsFinderRMT::SelectManager().
char* XrdCmsClientMan::Name | ( | ) | [inline] |
References Host.
Referenced by XrdCmsFinderRMT::Prepare().
XrdCmsClientMan* XrdCmsClientMan::nextManager | ( | ) | [inline] |
References Next.
Referenced by XrdCmsFinderRMT::Inform(), XrdCmsFinderRMT::SelectManager(), and XrdCmsFinderRMT::~XrdCmsFinderRMT().
char* XrdCmsClientMan::NPfx | ( | ) | [inline] |
References HPfx.
int XrdCmsClientMan::Receive | ( | ) | [private] |
References XrdNetBuffer::BuffSize(), XrdNetBuffer::data, DEBUG, XrdNetBuffer::dlen, EPNAME, Host, Link, XrdLink::Name(), NetBuff, XrdLink::RecvAll(), RecvCnt, Response, and Say.
Referenced by Start().
void XrdCmsClientMan::relayResp | ( | ) | [private] |
References XrdNetBufferQ::Alloc(), BuffQ, DEBUG, EPNAME, Host, HPfx, NetBuff, XrdCmsRespQ::Rem(), XrdCmsResp::Reply(), Response, RespQ, and XrdCms::CmsRRHdr::streamid.
Referenced by Start().
int XrdCmsClientMan::Send | ( | char * | msg, |
int | mlen = 0 |
||
) |
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 |
||
) |
References Active, XrdLink::Close(), Link, XrdSysMutex::Lock(), myData, XrdLink::Send(), SendCnt, and XrdSysMutex::UnLock().
static void XrdCmsClientMan::setConfig | ( | char * | cfn | ) | [inline, static] |
References ConfigFN.
Referenced by XrdCmsFinderRMT::Configure().
void XrdCmsClientMan::setNext | ( | XrdCmsClientMan * | np | ) | [inline] |
References Next.
Referenced by XrdCmsFinderRMT::StartManagers().
void XrdCmsClientMan::setStatus | ( | ) | [private] |
References DEBUG, EPNAME, Host, XrdSysMutex::Lock(), XrdCms::CmsRRHdr::modifier, myData, Response, Say, Suspend, and XrdSysMutex::UnLock().
Referenced by Start().
void * XrdCmsClientMan::Start | ( | ) |
References Active, XrdLink::Close(), dally, 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, Say, setStatus(), XrdSysTimer::Snooze(), Suspend, syncResp, XrdSysMutex::UnLock(), and XrdSysSemaphore::Wait().
Referenced by XrdCmsStartManager().
int XrdCmsClientMan::Suspended | ( | ) | [inline] |
References chkStatus(), and Suspend.
Referenced by XrdCmsFinderRMT::SelectManager(), and XrdCmsFinderRMT::send2Man().
int XrdCmsClientMan::waitTime | ( | ) | [inline] |
References repWait.
Referenced by XrdCmsFinderRMT::send2Man().
int XrdCmsClientMan::whatsUp | ( | const char * | user, |
const char * | path | ||
) |
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::Active [private] |
Referenced by chkStatus(), Hookup(), isActive(), Send(), Start(), whatsUp(), and XrdCmsClientMan().
XrdNetBufferQ XrdCmsClientMan::BuffQ [static, private] |
Referenced by relayResp(), and XrdCmsClientMan().
int XrdCmsClientMan::chkCount [private] |
Referenced by chkStatus(), and XrdCmsClientMan().
const int XrdCmsClientMan::chkVal = 256 [static, private] |
Referenced by chkStatus(), and XrdCmsClientMan().
char * XrdCmsClientMan::ConfigFN = 0 [static, private] |
Referenced by setConfig().
int XrdCmsClientMan::dally [private] |
Referenced by Hookup(), Start(), and XrdCmsClientMan().
char XrdCmsClientMan::doDebug = 0 [static] |
char* XrdCmsClientMan::Host [private] |
Referenced by delayResp(), Hookup(), Name(), Receive(), relayResp(), setStatus(), Start(), XrdCmsClientMan(), and ~XrdCmsClientMan().
char* XrdCmsClientMan::HPfx [private] |
Referenced by NPfx(), relayResp(), Start(), whatsUp(), XrdCmsClientMan(), and ~XrdCmsClientMan().
time_t XrdCmsClientMan::lastTOut [private] |
Referenced by Hookup(), whatsUp(), and XrdCmsClientMan().
time_t XrdCmsClientMan::lastUpdt [private] |
Referenced by chkStatus(), and XrdCmsClientMan().
XrdLink* XrdCmsClientMan::Link [private] |
Referenced by chkStatus(), Hookup(), Receive(), Send(), Start(), whatsUp(), XrdCmsClientMan(), and ~XrdCmsClientMan().
int XrdCmsClientMan::manMask [private] |
Referenced by Hookup(), and XrdCmsClientMan().
XrdSysMutex XrdCmsClientMan::manMutex [static, private] |
Referenced by Hookup().
int XrdCmsClientMan::maxDelay [private] |
Referenced by whatsUp(), and XrdCmsClientMan().
int XrdCmsClientMan::maxMsgID [private] |
Referenced by delayResp().
int XrdCmsClientMan::minDelay [private] |
Referenced by whatsUp(), and XrdCmsClientMan().
XrdSysMutex XrdCmsClientMan::myData [private] |
Referenced by chkStatus(), Hookup(), Send(), setStatus(), Start(), and whatsUp().
XrdNetBuffer* XrdCmsClientMan::NetBuff [private] |
Referenced by Receive(), relayResp(), Start(), XrdCmsClientMan(), and ~XrdCmsClientMan().
XrdCmsClientMan* XrdCmsClientMan::Next [private] |
Referenced by nextManager(), and setNext().
int XrdCmsClientMan::nrMax [private] |
Referenced by whatsUp(), and XrdCmsClientMan().
int XrdCmsClientMan::Port [private] |
Referenced by Hookup(), and XrdCmsClientMan().
int XrdCmsClientMan::qTime [private] |
int XrdCmsClientMan::RecvCnt [private] |
Referenced by Hookup(), Receive(), whatsUp(), and XrdCmsClientMan().
int XrdCmsClientMan::repWait [private] |
Referenced by Hookup(), waitTime(), whatsUp(), and XrdCmsClientMan().
int XrdCmsClientMan::repWMax [private] |
Referenced by Hookup(), whatsUp(), and XrdCmsClientMan().
XrdCms::CmsRRHdr XrdCmsClientMan::Response [private] |
Referenced by Receive(), relayResp(), setStatus(), and Start().
XrdCmsRespQ XrdCmsClientMan::RespQ [private] |
Referenced by delayResp(), and relayResp().
int XrdCmsClientMan::SendCnt [private] |
int XrdCmsClientMan::Silent [private] |
Referenced by Hookup(), whatsUp(), and XrdCmsClientMan().
int XrdCmsClientMan::Suspend [private] |
Referenced by Hookup(), setStatus(), Start(), Suspended(), whatsUp(), and XrdCmsClientMan().
XrdSysSemaphore XrdCmsClientMan::syncResp [private] |
Referenced by delayResp(), and Start().