xrootd
|
#include <XrdCmsPrepare.hh>
Public Member Functions | |
int | Add (XrdCmsPrepArgs &pargs) |
int | Del (char *reqid) |
int | Exists (char *path) |
void | Gone (char *path) |
void | DoIt () |
void | Inform (const char *cmd, XrdCmsPrepArgs *pargs) |
int | isOK () |
int | Pending () |
void | Prepare (XrdCmsPrepArgs *pargs) |
void | Reset (const char *iName, const char *aPath, int aMode) |
int | setParms (int rcnt, int stime, int deco=0) |
int | setParms (const char *ifpgm, char *ifmsg=0) |
int | setParms (XrdOucName2Name *n2n) |
XrdCmsPrepare () | |
~XrdCmsPrepare () | |
Private Member Functions | |
int | isOnline (char *path) |
void | Reset () |
void | Scrub () |
int | startIF () |
Private Attributes | |
XrdSysMutex | PTMutex |
XrdOucHash< char > | PTable |
XrdOucStream | prepSched |
XrdOucName2Name * | N2N |
XrdOucMsubs * | prepMsg |
XrdNetMsg * | Relay |
XrdFrmProxy * | PrepFrm |
char * | prepif |
time_t | lastemsg |
pid_t | preppid |
int | prepOK |
int | NumFiles |
int | doEcho |
int | resetcnt |
int | scrub2rst |
int | scrubtime |
XrdCmsPrepare::XrdCmsPrepare | ( | ) |
XrdCmsPrepare::~XrdCmsPrepare | ( | ) | [inline] |
int XrdCmsPrepare::Add | ( | XrdCmsPrepArgs & | pargs | ) |
References XrdOucHash< T >::Add(), XrdFrmProxy::Add(), Hash_data_is_key, XrdCmsPrepArgs::Ident, index(), Info, XrdOucStream::isAlive(), XrdSysMutex::Lock(), XrdOucMsubs::maxElem, XrdCmsPrepArgs::mode, N2N, XrdCmsPrepArgs::notify, NumFiles, XrdCmsPrepArgs::opaque, XrdCmsPrepArgs::path, PrepFrm, prepif, prepMsg, prepSched, XrdCmsPrepArgs::prty, PTable, PTMutex, XrdOucStream::Put(), XrdCmsPrepArgs::reqid, Say, XrdOucMsubs::Subs(), and XrdSysMutex::UnLock().
Referenced by Prepare().
int XrdCmsPrepare::Del | ( | char * | reqid | ) |
References XrdFrmProxy::Del(), XrdOucStream::isAlive(), XrdSysMutex::Lock(), PrepFrm, prepif, prepSched, PTMutex, XrdOucStream::Put(), Say, and XrdSysMutex::UnLock().
Referenced by XrdCmsNode::do_PrepDel().
void XrdCmsPrepare::DoIt | ( | ) | [virtual] |
Implements XrdJob.
References XrdCms::Sched, XrdScheduler::Schedule(), Scrub(), and scrubtime.
int XrdCmsPrepare::Exists | ( | char * | path | ) |
References XrdOucHash< T >::Find(), XrdSysMutex::Lock(), NumFiles, PTable, PTMutex, and XrdSysMutex::UnLock().
Referenced by XrdCmsBaseFS::Exists(), and isOnline().
void XrdCmsPrepare::Gone | ( | char * | path | ) |
References XrdOucHash< T >::Del(), XrdSysMutex::Lock(), NumFiles, PTable, PTMutex, and XrdSysMutex::UnLock().
Referenced by XrdCmsNode::do_Gone(), and XrdCmsAdmin::do_RmDid().
void XrdCmsPrepare::Inform | ( | const char * | cmd, |
XrdCmsPrepArgs * | pargs | ||
) |
References DEBUG, EPNAME, XrdCmsPrepArgs::Ident, index(), iovec::iov_base, iovec::iov_len, XrdCmsPrepArgs::mode, XrdCmsPrepArgs::notify, XrdCmsPrepArgs::path, XrdCmsPrepArgs::pathlen, Relay, XrdCmsPrepArgs::reqid, and XrdNetMsg::Send().
Referenced by XrdCmsNode::do_SelPrep(), and Prepare().
int XrdCmsPrepare::isOK | ( | ) | [inline] |
References prepOK.
Referenced by XrdCmsAdmin::do_RmDid().
int XrdCmsPrepare::isOnline | ( | char * | path | ) | [private] |
References XrdCms::Config, XrdCmsConfig::DiskSS, Exists(), XrdCmsConfig::ossFS, XrdOss::Stat(), stat(), XRDOSS_resonly, and XRDOSS_updtatm.
Referenced by Prepare().
int XrdCmsPrepare::Pending | ( | ) | [inline] |
References NumFiles.
void XrdCmsPrepare::Prepare | ( | XrdCmsPrepArgs * | pargs | ) |
References Add(), XrdCms::Config, DEBUG, XrdCmsConfig::DiskSS, EPNAME, XrdCmsPrepArgs::Ident, Inform(), isOnline(), XrdCmsPrepArgs::mode, XrdCmsPrepArgs::notify, XrdCmsPrepArgs::path, XrdCmsPrepArgs::prty, XrdCmsPrepArgs::reqid, and Say.
Referenced by XrdCmsPrepArgs::Process().
void XrdCmsPrepare::Reset | ( | const char * | iName, |
const char * | aPath, | ||
int | aMode | ||
) |
References DEBUG, EPNAME, XrdFrmProxy::Init(), XrdFrmProxy::opStg, PrepFrm, prepif, prepOK, Reset(), rindex, Say, XrdCms::Sched, XrdScheduler::Schedule(), and scrubtime.
Referenced by XrdCmsConfig::setupServer().
void XrdCmsPrepare::Reset | ( | ) | [private] |
References XrdOucHash< T >::Add(), doEcho, XrdOucStream::Drain(), XrdOucStream::GetLine(), Hash_data_is_key, XrdOucStream::isAlive(), XrdOucStream::LastError(), XrdFrmProxy::List(), NumFiles, XrdFrmProxy::opStg, PrepFrm, prepif, prepOK, prepSched, PTable, XrdOucHash< T >::Purge(), XrdOucStream::Put(), Say, and startIF().
void XrdCmsPrepare::Scrub | ( | ) | [private] |
References XrdOucHash< T >::Apply(), XrdOucStream::isAlive(), XrdSysMutex::Lock(), PrepFrm, prepSched, PTable, PTMutex, Reset(), resetcnt, scrub2rst, startIF(), XrdSysMutex::UnLock(), and XrdCmsScrubScan().
Referenced by DoIt().
int XrdCmsPrepare::setParms | ( | int | rcnt, |
int | stime, | ||
int | deco = 0 |
||
) |
References doEcho, resetcnt, scrub2rst, and scrubtime.
Referenced by XrdCmsConfig::ConfigN2N(), XrdCmsConfig::xprep(), and XrdCmsConfig::xprepm().
int XrdCmsPrepare::setParms | ( | const char * | ifpgm, |
char * | ifmsg = 0 |
||
) |
References XrdOucMsubs::Parse(), prepif, prepMsg, rindex, and Say.
int XrdCmsPrepare::setParms | ( | XrdOucName2Name * | n2n | ) | [inline] |
References N2N.
int XrdCmsPrepare::startIF | ( | ) | [private] |
int XrdCmsPrepare::doEcho [private] |
Referenced by Reset(), and setParms().
time_t XrdCmsPrepare::lastemsg [private] |
Referenced by startIF(), and XrdCmsPrepare().
XrdOucName2Name* XrdCmsPrepare::N2N [private] |
Referenced by Add(), and setParms().
int XrdCmsPrepare::NumFiles [private] |
XrdFrmProxy* XrdCmsPrepare::PrepFrm [private] |
char* XrdCmsPrepare::prepif [private] |
Referenced by Add(), Del(), Reset(), setParms(), startIF(), and XrdCmsPrepare().
XrdOucMsubs* XrdCmsPrepare::prepMsg [private] |
Referenced by Add(), and setParms().
int XrdCmsPrepare::prepOK [private] |
Referenced by isOK(), Reset(), startIF(), and XrdCmsPrepare().
pid_t XrdCmsPrepare::preppid [private] |
Referenced by XrdCmsPrepare().
XrdOucStream XrdCmsPrepare::prepSched [private] |
XrdOucHash<char> XrdCmsPrepare::PTable [private] |
XrdSysMutex XrdCmsPrepare::PTMutex [private] |
XrdNetMsg* XrdCmsPrepare::Relay [private] |
Referenced by Inform(), and XrdCmsPrepare().
int XrdCmsPrepare::resetcnt [private] |
Referenced by Scrub(), setParms(), and XrdCmsPrepare().
int XrdCmsPrepare::scrub2rst [private] |
Referenced by Scrub(), setParms(), and XrdCmsPrepare().
int XrdCmsPrepare::scrubtime [private] |
Referenced by DoIt(), Reset(), setParms(), and XrdCmsPrepare().