#include <XrdCmsPrepare.hh>
Inheritance diagram for XrdCmsPrepare:
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 | Queue (XrdCmsPrepArgs *parg) |
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 |
Definition at line 28 of file XrdCmsPrepare.hh.
XrdCmsPrepare::XrdCmsPrepare | ( | ) |
XrdCmsPrepare::~XrdCmsPrepare | ( | ) | [inline] |
Definition at line 61 of file XrdCmsPrepare.hh.
int XrdCmsPrepare::Add | ( | XrdCmsPrepArgs & | pargs | ) |
Definition at line 80 of file XrdCmsPrepare.cc.
References XrdFrmProxy::Add(), XrdOucHash< T >::Add(), XrdSysError::Emsg(), Hash_data_is_key, XrdCmsPrepArgs::Ident, Info, XrdOucStream::isAlive(), k, 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, XrdFrm::Say(), XrdOucMsubs::Subs(), and XrdSysMutex::UnLock().
Referenced by Prepare().
int XrdCmsPrepare::Del | ( | char * | reqid | ) |
Definition at line 148 of file XrdCmsPrepare.cc.
References XrdFrmProxy::Del(), XrdSysError::Emsg(), XrdOucStream::isAlive(), XrdSysMutex::Lock(), PrepFrm, prepif, prepSched, PTMutex, XrdOucStream::Put(), XrdFrm::Say(), and XrdSysMutex::UnLock().
Referenced by XrdCmsNode::do_PrepDel().
int XrdCmsPrepare::Exists | ( | char * | path | ) |
Definition at line 201 of file XrdCmsPrepare.cc.
References XrdOucHash< T >::Find(), XrdSysMutex::Lock(), NumFiles, PTable, PTMutex, and XrdSysMutex::UnLock().
Referenced by isOnline(), and XrdCmsNode::isOnline().
void XrdCmsPrepare::Gone | ( | char * | path | ) |
Definition at line 223 of file XrdCmsPrepare.cc.
References XrdOucHash< T >::Del(), XrdSysMutex::Lock(), NumFiles, PTable, PTMutex, and XrdSysMutex::UnLock().
Referenced by XrdCmsNode::do_Gone(), and XrdCmsAdmin::do_RmDid().
void XrdCmsPrepare::DoIt | ( | ) | [virtual] |
Implements XrdJob.
Definition at line 189 of file XrdCmsPrepare.cc.
References XrdCms::Sched, XrdScheduler::Schedule(), Scrub(), and scrubtime.
void XrdCmsPrepare::Inform | ( | const char * | cmd, | |
XrdCmsPrepArgs * | pargs | |||
) |
Definition at line 243 of file XrdCmsPrepare.cc.
References DEBUG, EPNAME, XrdCmsPrepArgs::Ident, iovec::iov_base, iovec::iov_len, minfo, 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] |
Definition at line 44 of file XrdCmsPrepare.hh.
References prepOK.
Referenced by XrdCmsAdmin::do_RmDid().
int XrdCmsPrepare::Pending | ( | ) | [inline] |
void XrdCmsPrepare::Prepare | ( | XrdCmsPrepArgs * | pargs | ) |
Definition at line 287 of file XrdCmsPrepare.cc.
References Add(), XrdFrm::Config(), DEBUG, XrdSysError::Emsg(), EPNAME, XrdCmsPrepArgs::Ident, Inform(), isOnline(), XrdCmsPrepArgs::mode, XrdCmsPrepArgs::notify, XrdCmsPrepArgs::path, XrdCmsPrepArgs::prty, XrdCmsPrepArgs::reqid, and XrdFrm::Say().
Referenced by XrdCmsPrepArgs::Process().
void XrdCmsPrepare::Queue | ( | XrdCmsPrepArgs * | parg | ) |
void XrdCmsPrepare::Reset | ( | const char * | iName, | |
const char * | aPath, | |||
int | aMode | |||
) |
Definition at line 312 of file XrdCmsPrepare.cc.
References DEBUG, XrdSysError::Emsg(), EPNAME, XrdFrmProxy::Init(), XrdSysError::logger(), XrdFrmProxy::opStg, PrepFrm, prepif, prepOK, Reset(), rindex, XrdFrm::Say(), XrdCms::Sched, XrdScheduler::Schedule(), scrubtime, and strcpy().
Referenced by XrdCmsConfig::setupServer().
int XrdCmsPrepare::setParms | ( | int | rcnt, | |
int | stime, | |||
int | deco = 0 | |||
) |
Definition at line 348 of file XrdCmsPrepare.cc.
References doEcho, resetcnt, scrub2rst, and scrubtime.
Referenced by XrdCmsConfig::ConfigN2N(), XrdCmsConfig::xprep(), and XrdCmsConfig::xprepm().
int XrdCmsPrepare::setParms | ( | const char * | ifpgm, | |
char * | ifmsg = 0 | |||
) |
Definition at line 355 of file XrdCmsPrepare.cc.
References free(), prepif, prepMsg, rindex, and XrdFrm::Say().
int XrdCmsPrepare::setParms | ( | XrdOucName2Name * | n2n | ) | [inline] |
int XrdCmsPrepare::isOnline | ( | char * | path | ) | [private] |
Definition at line 378 of file XrdCmsPrepare.cc.
References XrdFrm::Config(), Exists(), XrdFrmConfig::ossFS, stat, XrdOss::Stat(), XRDOSS_resonly, and XRDOSS_updtatm.
Referenced by Prepare().
void XrdCmsPrepare::Reset | ( | ) | [private] |
Definition at line 397 of file XrdCmsPrepare.cc.
References XrdOucHash< T >::Add(), doEcho, XrdOucStream::Drain(), XrdSysError::Emsg(), 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(), XrdFrm::Say(), and startIF().
void XrdCmsPrepare::Scrub | ( | ) | [private] |
Definition at line 443 of file XrdCmsPrepare.cc.
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::startIF | ( | ) | [private] |
Definition at line 461 of file XrdCmsPrepare.cc.
References DEBUG, XrdSysError::Emsg(), EPNAME, XrdOucStream::Exec(), lastemsg, XrdOucStream::LastError(), PrepFrm, prepif, prepOK, prepSched, and XrdFrm::Say().
XrdSysMutex XrdCmsPrepare::PTMutex [private] |
XrdOucHash<char> XrdCmsPrepare::PTable [private] |
XrdOucStream XrdCmsPrepare::prepSched [private] |
XrdOucName2Name* XrdCmsPrepare::N2N [private] |
XrdOucMsubs* XrdCmsPrepare::prepMsg [private] |
XrdNetMsg* XrdCmsPrepare::Relay [private] |
XrdFrmProxy* XrdCmsPrepare::PrepFrm [private] |
Definition at line 76 of file XrdCmsPrepare.hh.
Referenced by Add(), Del(), Reset(), Scrub(), startIF(), and XrdCmsPrepare().
char* XrdCmsPrepare::prepif [private] |
Definition at line 77 of file XrdCmsPrepare.hh.
Referenced by Add(), Del(), Reset(), setParms(), startIF(), and XrdCmsPrepare().
time_t XrdCmsPrepare::lastemsg [private] |
pid_t XrdCmsPrepare::preppid [private] |
int XrdCmsPrepare::prepOK [private] |
Definition at line 80 of file XrdCmsPrepare.hh.
Referenced by isOK(), Reset(), startIF(), and XrdCmsPrepare().
int XrdCmsPrepare::NumFiles [private] |
Definition at line 81 of file XrdCmsPrepare.hh.
Referenced by Add(), Exists(), Gone(), Pending(), Reset(), and XrdCmsPrepare().
int XrdCmsPrepare::doEcho [private] |
int XrdCmsPrepare::resetcnt [private] |
Definition at line 83 of file XrdCmsPrepare.hh.
Referenced by Scrub(), setParms(), and XrdCmsPrepare().
int XrdCmsPrepare::scrub2rst [private] |
Definition at line 84 of file XrdCmsPrepare.hh.
Referenced by Scrub(), setParms(), and XrdCmsPrepare().
int XrdCmsPrepare::scrubtime [private] |
Definition at line 85 of file XrdCmsPrepare.hh.
Referenced by DoIt(), Reset(), setParms(), and XrdCmsPrepare().