xrootd
|
#include <XrdCmsFinder.hh>
Public Member Functions | |
void | Added (const char *path, int Pend=0) |
int | Configure (char *cfn) |
int | Forward (XrdOucErrInfo &Resp, const char *cmd, const char *arg1=0, const char *arg2=0, const char *arg3=0, const char *arg4=0) |
int | Locate (XrdOucErrInfo &Resp, const char *path, int flags, XrdOucEnv *Info=0) |
int | Prepare (XrdOucErrInfo &Resp, XrdSfsPrep &pargs) |
void | Removed (const char *path) |
void | setSS (XrdOss *thess) |
int | Space (XrdOucErrInfo &Resp, const char *path) |
XrdCmsFinderRMT (XrdSysLogger *lp, int whoami=0, int Port=0) | |
~XrdCmsFinderRMT () | |
Static Public Attributes | |
static const int | MaxMan = 16 |
Private Member Functions | |
int | Decode (char **resp) |
void | Inform (XrdCmsClientMan *xman, struct iovec xmsg[], int xnum) |
XrdCmsClientMan * | SelectManager (XrdOucErrInfo &Resp, const char *path) |
void | SelectManFail (XrdOucErrInfo &Resp) |
int | send2Man (XrdOucErrInfo &, const char *, struct iovec *, int) |
int | StartManagers (XrdOucTList *) |
Private Attributes | |
XrdCmsClientMan * | myManTable [MaxMan] |
XrdCmsClientMan * | myManagers |
int | myManCount |
XrdSysMutex | myData |
char * | CMSPath |
int | ConWait |
int | RepDelay |
int | RepNone |
int | RepWait |
int | FwdWait |
int | PrepWait |
int | isMeta |
int | isTarget |
int | myPort |
unsigned char | SMode |
unsigned char | sendID |
XrdCmsFinderRMT::XrdCmsFinderRMT | ( | XrdSysLogger * | lp, |
int | whoami = 0 , |
||
int | Port = 0 |
||
) |
References XrdCms::IsMeta, isMeta, XrdCms::IsTarget, isTarget, myManagers, myManCount, myPort, Say, sendID, and SMode.
XrdCmsFinderRMT::~XrdCmsFinderRMT | ( | ) |
References myManagers, and XrdCmsClientMan::nextManager().
void XrdCmsFinderRMT::Added | ( | const char * | path, |
int | Pend = 0 |
||
) | [inline, virtual] |
Implements XrdCmsClient.
int XrdCmsFinderRMT::Configure | ( | char * | cfn | ) | [virtual] |
Implements XrdCmsClient.
References XrdCmsClient::amProxy, XrdCmsClientConfig::CMSPath, CMSPath, XrdCmsClientConfig::configMan, XrdCmsClientConfig::configMeta, XrdCmsClientConfig::configNorm, XrdCmsClientConfig::configProxy, XrdCmsClientConfig::configSuper, XrdCmsClientConfig::Configure(), XrdCmsClientConfig::ConWait, ConWait, XrdCmsClientConfig::FwdWait, FwdWait, XrdCmsClientConfig::haveMeta, isMeta, XrdCms::IsProxy, XrdCms::IsRedir, isTarget, XrdCmsClientConfig::ManList, XrdCmsClient::myPersona, myPort, XrdCmsClientConfig::PanList, XrdCmsClientConfig::PrepWait, PrepWait, XrdCmsClientConfig::RepDelay, RepDelay, XrdCmsClientConfig::RepNone, RepNone, XrdCmsClientConfig::RepWait, RepWait, XrdCmsFinderTRG::RunAdmin(), Say, XrdCmsClientMan::setConfig(), XrdCmsClientConfig::SMode, SMode, XrdCmsClientConfig::SModeP, and StartManagers().
int XrdCmsFinderRMT::Decode | ( | char ** | resp | ) | [private] |
int XrdCmsFinderRMT::Forward | ( | XrdOucErrInfo & | Resp, |
const char * | cmd, | ||
const char * | arg1 = 0 , |
||
const char * | arg2 = 0 , |
||
const char * | arg3 = 0 , |
||
const char * | arg4 = 0 |
||
) | [virtual] |
Implements XrdCmsClient.
References ConWait, XrdCmsClientMan::doDebug, FwdWait, XrdOucErrInfo::getErrUser(), gettimeofday(), XrdCmsRRData::Ident, Inform(), iovec::iov_base, iovec::iov_len, XrdCms::kYR_chmod, XrdCms::kYR_dnf, XrdCms::kYR_mkdir, XrdCms::kYR_mkpath, XrdCms::kYR_mv, XrdCms::kYR_rm, XrdCms::kYR_rmdir, XrdCms::kYR_trunc, XrdSysMutex::Lock(), XrdCmsRRData::Mode, XrdCmsRRData::Opaque, XrdCmsRRData::Opaque2, XrdCmsParser::Pack(), XrdCms::Parser, XrdCmsRRData::Path, XrdCmsRRData::Path2, RepDelay, XrdCmsRRData::Request, XrdCms::CmsRRHdr::rrCode, Say, SelectManager(), XrdCmsClientMan::Send(), send2Man(), XrdOucErrInfo::setErrInfo(), XrdSysMutex::UnLock(), and XrdSysTimer::Wait().
void XrdCmsFinderRMT::Inform | ( | XrdCmsClientMan * | xman, |
struct iovec | xmsg[], | ||
int | xnum | ||
) | [private] |
References XrdCmsClientMan::isActive(), myManagers, XrdCmsClientMan::nextManager(), Say, and XrdCmsClientMan::Send().
Referenced by Forward().
int XrdCmsFinderRMT::Locate | ( | XrdOucErrInfo & | Resp, |
const char * | path, | ||
int | flags, | ||
XrdOucEnv * | Info = 0 |
||
) | [virtual] |
Implements XrdCmsClient.
References XrdCmsRRData::Avoid, XrdCmsClientMan::doDebug, XrdOucEnv::Env(), XrdOucEnv::Get(), XrdOucErrInfo::getErrUser(), XrdCmsRRData::Ident, iovec::iov_base, iovec::iov_len, XrdCms::kYR_locate, XrdCms::kYR_select, XrdCms::kYR_trunc, XrdCmsRRData::Opaque, XrdCmsRRData::Opts, XrdCmsParser::Pack(), XrdCms::Parser, XrdCmsRRData::Path, XrdCmsRRData::Request, XrdCms::CmsRRHdr::rrCode, send2Man(), XrdOucErrInfo::setErrInfo(), SFS_O_CREAT, SFS_O_LOCATE, SFS_O_META, SFS_O_NOWAIT, SFS_O_RDWR, SFS_O_REPLICA, SFS_O_RESET, SFS_O_STAT, SFS_O_TRUNC, and SFS_O_WRONLY.
int XrdCmsFinderRMT::Prepare | ( | XrdOucErrInfo & | Resp, |
XrdSfsPrep & | pargs | ||
) | [virtual] |
Implements XrdCmsClient.
References ConWait, DEBUG, XrdCmsClientMan::doDebug, EPNAME, XrdOucErrInfo::getErrUser(), XrdCmsRRData::Ident, iovec::iov_base, iovec::iov_len, XrdCms::kYR_prepadd, XrdCms::kYR_prepdel, XrdSysMutex::Lock(), XrdCmsRRData::Mode, XrdCms::CmsRRHdr::modifier, XrdCmsClientMan::Name(), XrdOucTList::next, XrdCmsRRData::Notify, XrdSfsPrep::notify, XrdSfsPrep::oinfo, XrdCmsRRData::Opaque, XrdSfsPrep::opts, XrdCmsParser::Pack(), XrdCms::Parser, XrdCmsRRData::Path, XrdSfsPrep::paths, Prep_COLOC, Prep_FRESH, Prep_PMASK, Prep_SENDACK, Prep_SENDERR, Prep_STAGE, Prep_WMODE, PrepWait, XrdCmsRRData::Prty, RepDelay, XrdSfsPrep::reqid, XrdCmsRRData::Reqid, XrdCmsRRData::Request, XrdCms::CmsRRHdr::rrCode, Say, SelectManager(), XrdCmsClientMan::Send(), XrdOucErrInfo::setErrInfo(), XrdCms::CmsRRHdr::streamid, strlcpy(), XrdOucTList::text, XrdSysMutex::UnLock(), XrdOucTList::val, and XrdSysTimer::Wait().
void XrdCmsFinderRMT::Removed | ( | const char * | path | ) | [inline, virtual] |
Implements XrdCmsClient.
XrdCmsClientMan * XrdCmsFinderRMT::SelectManager | ( | XrdOucErrInfo & | Resp, |
const char * | path | ||
) | [private] |
References ConWait, XrdOucReqID::Index(), XrdCmsClientMan::isActive(), myManagers, myManCount, myManTable, XrdCmsClientMan::nextManager(), XrdCmsClientConfig::RoundRob, Say, SelectManFail(), XrdOucErrInfo::setErrInfo(), SMode, and XrdCmsClientMan::Suspended().
Referenced by Forward(), Prepare(), and send2Man().
void XrdCmsFinderRMT::SelectManFail | ( | XrdOucErrInfo & | Resp | ) | [private] |
References ConWait, EPNAME, XrdOucErrInfo::getErrUser(), XrdSysMutex::Lock(), myData, Say, XrdOucErrInfo::setErrInfo(), TRACE, and XrdSysMutex::UnLock().
Referenced by SelectManager().
int XrdCmsFinderRMT::send2Man | ( | XrdOucErrInfo & | Resp, |
const char * | path, | ||
struct iovec * | xmsg, | ||
int | xnum | ||
) | [private] |
References XrdCmsClientMsg::Alloc(), ConWait, XrdCmsClientMan::delayResp(), EINPROGRESS, EPNAME, XrdOucErrInfo::getErrInfo(), XrdOucErrInfo::getErrUser(), XrdCmsClientMsg::getResult(), XrdCmsClientMsg::ID(), iovec::iov_base, QTRACE, XrdCmsClientMsg::Recycle(), RepDelay, SelectManager(), XrdCmsClientMan::Send(), XrdOucErrInfo::setErrInfo(), XrdCmsClientMan::Suspended(), TRACE, XrdCmsClientMsg::Wait4Reply(), XrdCmsClientMan::waitTime(), and XrdCmsClientMan::whatsUp().
void XrdCmsFinderRMT::setSS | ( | XrdOss * | thess | ) | [inline] |
int XrdCmsFinderRMT::Space | ( | XrdOucErrInfo & | Resp, |
const char * | path | ||
) | [virtual] |
int XrdCmsFinderRMT::StartManagers | ( | XrdOucTList * | myManList | ) | [private] |
References ConWait, MaxMan, myManagers, myManCount, myManTable, XrdOucTList::next, RepDelay, RepNone, RepWait, XrdSysThread::Run(), Say, XrdCmsClientMan::setNext(), XrdOucTList::text, XrdOucTList::val, XrdCmsStartManager(), and XrdCmsStartResp().
Referenced by Configure().
char* XrdCmsFinderRMT::CMSPath [private] |
Referenced by Configure().
int XrdCmsFinderRMT::ConWait [private] |
Referenced by Configure(), Forward(), Prepare(), SelectManager(), SelectManFail(), send2Man(), and StartManagers().
int XrdCmsFinderRMT::FwdWait [private] |
Referenced by Configure(), and Forward().
int XrdCmsFinderRMT::isMeta [private] |
Referenced by Configure(), and XrdCmsFinderRMT().
int XrdCmsFinderRMT::isTarget [private] |
Referenced by Configure(), and XrdCmsFinderRMT().
const int XrdCmsFinderRMT::MaxMan = 16 [static] |
Referenced by StartManagers().
XrdSysMutex XrdCmsFinderRMT::myData [private] |
Referenced by SelectManFail().
XrdCmsClientMan* XrdCmsFinderRMT::myManagers [private] |
Referenced by Inform(), SelectManager(), StartManagers(), XrdCmsFinderRMT(), and ~XrdCmsFinderRMT().
int XrdCmsFinderRMT::myManCount [private] |
Referenced by SelectManager(), StartManagers(), and XrdCmsFinderRMT().
XrdCmsClientMan* XrdCmsFinderRMT::myManTable[MaxMan] [private] |
Referenced by SelectManager(), and StartManagers().
int XrdCmsFinderRMT::myPort [private] |
Referenced by Configure(), and XrdCmsFinderRMT().
int XrdCmsFinderRMT::PrepWait [private] |
Referenced by Configure(), and Prepare().
int XrdCmsFinderRMT::RepDelay [private] |
Referenced by Configure(), Forward(), Prepare(), send2Man(), and StartManagers().
int XrdCmsFinderRMT::RepNone [private] |
Referenced by Configure(), and StartManagers().
int XrdCmsFinderRMT::RepWait [private] |
Referenced by Configure(), and StartManagers().
unsigned char XrdCmsFinderRMT::sendID [private] |
Referenced by XrdCmsFinderRMT().
unsigned char XrdCmsFinderRMT::SMode [private] |
Referenced by Configure(), SelectManager(), and XrdCmsFinderRMT().