#include <XrdCmsRRQ.hh>
Public Member Functions | |
short | Add (short Snum, XrdCmsRRQInfo *ip) |
void | Del (short Snum, const void *Key) |
int | Init (int Tint=0, int Tdly=0) |
void | Ready (int Snum, const void *Key, SMask_t mask1, SMask_t mask2) |
void * | Respond () |
void * | TimeOut () |
XrdCmsRRQ () | |
~XrdCmsRRQ () | |
Private Member Functions | |
void | sendLocResp (XrdCmsRRQSlot *lP) |
void | sendResponse (XrdCmsRRQInfo *Info, int doredir, int totlen=0) |
Private Attributes | |
XrdSysMutex | myMutex |
XrdSysSemaphore | isWaiting |
XrdSysSemaphore | isReady |
XrdCmsRRQSlot | Slot [numSlots] |
XrdOucDLlist< XrdCmsRRQSlot > | waitQ |
XrdOucDLlist< XrdCmsRRQSlot > | readyQ |
iovec | data_iov [iov_cnt] |
iovec | redr_iov [iov_cnt] |
XrdCms::CmsResponse | dataResp |
XrdCms::CmsResponse | redrResp |
XrdCms::CmsResponse | waitResp |
union { | |
char hostbuff [288] | |
char databuff [XrdCms::CmsLocateRequest::RILen *STMax] | |
}; | |
int | Tslice |
int | Tdelay |
unsigned int | myClock |
Static Private Attributes | |
static const int | numSlots = 1024 |
static const int | iov_cnt = 2 |
Definition at line 82 of file XrdCmsRRQ.hh.
XrdCmsRRQ::XrdCmsRRQ | ( | ) | [inline] |
Definition at line 98 of file XrdCmsRRQ.hh.
XrdCmsRRQ::~XrdCmsRRQ | ( | ) | [inline] |
Definition at line 100 of file XrdCmsRRQ.hh.
short XrdCmsRRQ::Add | ( | short | Snum, | |
XrdCmsRRQInfo * | ip | |||
) |
Definition at line 61 of file XrdCmsRRQ.cc.
References XrdCmsRRQSlot::Alloc(), XrdCmsRRQSlot::Cont, XrdCmsRRQSlot::Expire, Info, XrdOucDLlist< T >::Insert(), isWaiting, XrdCmsRRQSlot::Link, XrdCmsRRQSlot::LkUp, XrdSysMutex::Lock(), myClock, myMutex, XrdSysSemaphore::Post(), XrdOucDLlist< T >::Prev(), XrdOucDLlist< T >::Singleton(), Slot, XrdCmsRRQSlot::slotNum, XrdSysMutex::UnLock(), and waitQ.
Referenced by XrdCmsCache::Add2Q().
void XrdCmsRRQ::Del | ( | short | Snum, | |
const void * | Key | |||
) |
Definition at line 100 of file XrdCmsRRQ.cc.
References Ready().
Referenced by XrdCmsCache::Recycle().
int XrdCmsRRQ::Init | ( | int | Tint = 0 , |
|
int | Tdly = 0 | |||
) |
Definition at line 109 of file XrdCmsRRQ.cc.
References data_iov, databuff, XrdCms::CmsRRHdr::datalen, dataResp, XrdSysError::Emsg(), XrdCms::CmsResponse::Hdr, hostbuff, iovec::iov_base, iovec::iov_len, XrdCms::kYR_data, XrdCms::kYR_redirect, XrdCms::kYR_wait, XrdCms::CmsRRHdr::modifier, redr_iov, redrResp, XrdCms::CmsRRHdr::rrCode, XrdSysThread::Run(), XrdFrm::Say(), XrdCms::CmsRRHdr::streamid, Tdelay, Tslice, XrdCms::CmsResponse::Val, waitResp, XrdCmsRRQ_StartRespond(), and XrdCmsRRQ_StartTimeOut().
Referenced by XrdCmsConfig::setupManager().
Definition at line 180 of file XrdCmsRRQ.cc.
References XrdCmsRRQSlot::Arg1, XrdCmsRRQSlot::Arg2, XrdCmsRRQSlot::Expire, XrdCmsRRQSlot::Info, XrdOucDLlist< T >::Insert(), isReady, XrdCmsRRQInfo::Key, XrdCmsRRQSlot::Link, XrdSysMutex::Lock(), myMutex, XrdSysSemaphore::Post(), XrdOucDLlist< T >::Prev(), readyQ, XrdOucDLlist< T >::Remove(), XrdOucDLlist< T >::Singleton(), Slot, and XrdSysMutex::UnLock().
Referenced by Del(), and XrdCmsCache::Dispatch().
void * XrdCmsRRQ::Respond | ( | ) |
Definition at line 209 of file XrdCmsRRQ.cc.
References XrdCmsRRQSlot::Arg1, XrdCmsRRQSlot::Arg2, XrdCms::Cluster, XrdCmsRRQSlot::Cont, XrdCms::CmsRRHdr::datalen, XrdCmsRRQSlot::Expire, XrdCms::CmsResponse::Hdr, hostbuff, XrdCmsRRQSlot::Info, iovec::iov_len, XrdCmsRRQInfo::isLU, isReady, XrdCmsRRQInfo::isRW, XrdOucDLlist< T >::Item(), XrdCmsRRQSlot::Link, XrdCmsRRQSlot::LkUp, XrdSysMutex::Lock(), myMutex, XrdOucDLlist< T >::Next(), XrdMonCtrCollector::port, readyQ, XrdCmsRRQSlot::Recycle(), redr_iov, redrResp, XrdOucDLlist< T >::Remove(), XrdCmsCluster::Select(), sendLocResp(), sendResponse(), XrdOucDLlist< T >::Singleton(), XrdSysMutex::UnLock(), XrdCms::CmsResponse::Val, and XrdSysSemaphore::Wait().
Referenced by XrdCmsRRQ_StartRespond().
void * XrdCmsRRQ::TimeOut | ( | ) |
Definition at line 329 of file XrdCmsRRQ.cc.
References XrdCmsRRQSlot::Arg1, XrdCmsRRQSlot::Arg2, XrdCmsRRQSlot::Expire, XrdOucDLlist< T >::Insert(), isReady, isWaiting, XrdOucDLlist< T >::Item(), XrdCmsRRQSlot::Link, XrdSysMutex::Lock(), myClock, myMutex, XrdOucDLlist< T >::Next(), XrdSysSemaphore::Post(), XrdOucDLlist< T >::Prev(), readyQ, XrdOucDLlist< T >::Remove(), XrdOucDLlist< T >::Singleton(), Tslice, XrdSysMutex::UnLock(), XrdSysSemaphore::Wait(), XrdSysTimer::Wait(), and waitQ.
Referenced by XrdCmsRRQ_StartTimeOut().
void XrdCmsRRQ::sendLocResp | ( | XrdCmsRRQSlot * | lP | ) | [private] |
Definition at line 255 of file XrdCmsRRQ.cc.
References XrdCmsRRQSlot::Arg1, XrdCmsRRQSlot::Arg2, XrdCms::Cluster, XrdCmsRRQSlot::Cont, data_iov, databuff, XrdCms::CmsRRHdr::datalen, dataResp, XrdCmsNode::do_LocFmt(), XrdCmsRTable::Find(), XrdCms::CmsResponse::Hdr, XrdCmsRRQInfo::ID, XrdCmsRRQSlot::Info, iov_cnt, iovec::iov_len, XrdCmsCluster::List(), XrdCmsRTable::Lock(), XrdCmsCluster::LS_IPV6, XrdCmsRRQInfo::Rinst, XrdCmsRRQInfo::Rnum, XrdCms::RTable, XrdCmsRRQInfo::rwVec, XrdCmsNode::Send(), sendResponse(), XrdCms::CmsRRHdr::streamid, and XrdCmsRTable::UnLock().
Referenced by Respond().
void XrdCmsRRQ::sendResponse | ( | XrdCmsRRQInfo * | Info, | |
int | doredir, | |||
int | totlen = 0 | |||
) | [private] |
Definition at line 303 of file XrdCmsRRQ.cc.
References XrdCmsRTable::Find(), XrdCms::CmsResponse::Hdr, Info, iov_cnt, XrdCmsRTable::Lock(), redr_iov, redrResp, XrdCms::RTable, XrdCmsNode::Send(), XrdCms::CmsRRHdr::streamid, XrdCmsRTable::UnLock(), and waitResp.
Referenced by Respond(), and sendLocResp().
const int XrdCmsRRQ::numSlots = 1024 [static, private] |
Definition at line 106 of file XrdCmsRRQ.hh.
XrdSysMutex XrdCmsRRQ::myMutex [private] |
XrdSysSemaphore XrdCmsRRQ::isWaiting [private] |
XrdSysSemaphore XrdCmsRRQ::isReady [private] |
XrdCmsRRQSlot XrdCmsRRQ::Slot[numSlots] [private] |
XrdOucDLlist<XrdCmsRRQSlot> XrdCmsRRQ::waitQ [private] |
XrdOucDLlist<XrdCmsRRQSlot> XrdCmsRRQ::readyQ [private] |
const int XrdCmsRRQ::iov_cnt = 2 [static, private] |
struct iovec XrdCmsRRQ::data_iov[iov_cnt] [private] |
struct iovec XrdCmsRRQ::redr_iov[iov_cnt] [private] |
XrdCms::CmsResponse XrdCmsRRQ::dataResp [private] |
XrdCms::CmsResponse XrdCmsRRQ::redrResp [private] |
XrdCms::CmsResponse XrdCmsRRQ::waitResp [private] |
char XrdCmsRRQ::hostbuff[288] [private] |
char XrdCmsRRQ::databuff[XrdCms::CmsLocateRequest::RILen *STMax] [private] |
union { ... } [private] |
int XrdCmsRRQ::Tslice [private] |
int XrdCmsRRQ::Tdelay [private] |
unsigned int XrdCmsRRQ::myClock [private] |