#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 | Pending () |
| void | Prepare (XrdCmsPrepArgs *pargs) |
| void | Queue (XrdCmsPrepArgs *parg) |
| int | Reset () |
| int | setParms (int rcnt, int stime, int deco=0) |
| int | setParms (char *ifpgm, char *ifmsg=0) |
| int | setParms (XrdOucName2Name *n2n) |
| XrdCmsPrepare () | |
| ~XrdCmsPrepare () | |
Private Member Functions | |
| int | getID (const char *Tid, char *buff, int bsz) |
| int | isOnline (char *path) |
| void | Scrub () |
| int | startIF () |
Private Attributes | |
| XrdSysMutex | PTMutex |
| XrdOucHash< char > | PTable |
| XrdOucStream | prepSched |
| XrdOucName2Name * | N2N |
| XrdOucMsubs * | prepMsg |
| XrdNetMsg * | Relay |
| time_t | lastemsg |
| pid_t | preppid |
| int | NumFiles |
| int | doEcho |
| int | resetcnt |
| int | scrub2rst |
| int | scrubtime |
| int | isFrm |
| char * | prepif |
| XrdCmsPrepare::XrdCmsPrepare | ( | ) |
| XrdCmsPrepare::~XrdCmsPrepare | ( | ) | [inline] |
| int XrdCmsPrepare::Add | ( | XrdCmsPrepArgs & | pargs | ) |
References XrdOucHash< T >::Add(), getID(), Hash_data_is_key, XrdCmsPrepArgs::Ident, index(), Info, XrdOucStream::isAlive(), isFrm, XrdSysMutex::Lock(), XrdOucMsubs::maxElem, XrdCmsPrepArgs::mode, N2N, XrdCmsPrepArgs::notify, NumFiles, XrdCmsPrepArgs::opaque, XrdCmsPrepArgs::path, prepif, prepMsg, prepSched, XrdCmsPrepArgs::prty, PTable, PTMutex, XrdOucStream::Put(), XrdCmsPrepArgs::reqid, Say, XrdOucMsubs::Subs(), and XrdSysMutex::UnLock().
Referenced by XrdOlbServer::do_PrepAdd4Real(), and Prepare().
| int XrdCmsPrepare::Del | ( | char * | reqid | ) |
References XrdOucStream::isAlive(), XrdSysMutex::Lock(), prepif, prepSched, PTMutex, XrdOucStream::Put(), Say, and XrdSysMutex::UnLock().
Referenced by XrdOlbServer::do_PrepDel(), and XrdCmsNode::do_PrepDel().
| void XrdCmsPrepare::DoIt | ( | ) | [virtual] |
Implements XrdJob.
References prepif, 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 XrdOlbServer::isOnline(), isOnline(), and XrdCmsNode::isOnline().
| int XrdCmsPrepare::getID | ( | const char * | Tid, | |
| char * | buff, | |||
| int | bsz | |||
| ) | [private] |
Referenced by Add().
| void XrdCmsPrepare::Gone | ( | char * | path | ) |
References XrdOucHash< T >::Del(), XrdSysMutex::Lock(), NumFiles, PTable, PTMutex, and XrdSysMutex::UnLock().
Referenced by XrdOlbServer::do_Gone(), XrdCmsNode::do_Gone(), XrdOlbAdmin::do_RmDid(), 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::isOnline | ( | char * | path | ) | [private] |
References XrdCms::Config, XrdCmsConfig::DiskSS, Exists(), XrdCmsConfig::ossFS, XrdOss::Stat(), stat(), and XRDOSS_resonly.
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::Queue | ( | XrdCmsPrepArgs * | parg | ) |
| int XrdCmsPrepare::Reset | ( | ) |
References XrdOucHash< T >::Add(), doEcho, XrdOucStream::Drain(), XrdOucStream::GetLine(), Hash_data_is_key, XrdOucStream::isAlive(), XrdOucStream::LastError(), NumFiles, prepif, prepSched, PTable, XrdOucHash< T >::Purge(), XrdOucStream::Put(), resetcnt, Say, scrub2rst, and startIF().
Referenced by Scrub(), XrdOlbConfig::setupServer(), and XrdCmsConfig::setupServer().
| void XrdCmsPrepare::Scrub | ( | ) | [private] |
References XrdOucHash< T >::Apply(), XrdOucStream::isAlive(), XrdSysMutex::Lock(), prepSched, PTable, PTMutex, Reset(), scrub2rst, startIF(), XrdSysMutex::UnLock(), and XrdCmsScrubScan().
Referenced by DoIt().
| int XrdCmsPrepare::setParms | ( | XrdOucName2Name * | n2n | ) | [inline] |
References N2N.
| int XrdCmsPrepare::setParms | ( | char * | ifpgm, | |
| char * | ifmsg = 0 | |||
| ) |
References isFrm, XrdOucMsubs::Parse(), prepif, prepMsg, and Say.
| int XrdCmsPrepare::setParms | ( | int | rcnt, | |
| int | stime, | |||
| int | deco = 0 | |||
| ) |
References doEcho, resetcnt, scrub2rst, and scrubtime.
Referenced by XrdOlbConfig::ConfigN2N(), XrdCmsConfig::ConfigN2N(), XrdOlbConfig::setupServer(), XrdOlbConfig::xprep(), XrdCmsConfig::xprep(), XrdOlbConfig::xprepm(), and XrdCmsConfig::xprepm().
| int XrdCmsPrepare::startIF | ( | ) | [private] |
References DEBUG, EPNAME, XrdOucStream::Exec(), lastemsg, XrdOucStream::LastError(), prepif, prepSched, and Say.
int XrdCmsPrepare::doEcho [private] |
Referenced by Reset(), and setParms().
int XrdCmsPrepare::isFrm [private] |
Referenced by Add(), setParms(), and XrdCmsPrepare().
time_t XrdCmsPrepare::lastemsg [private] |
Referenced by startIF(), and XrdCmsPrepare().
XrdOucName2Name* XrdCmsPrepare::N2N [private] |
Referenced by Add(), and setParms().
int XrdCmsPrepare::NumFiles [private] |
char* XrdCmsPrepare::prepif [private] |
Referenced by Add(), Del(), DoIt(), Reset(), setParms(), startIF(), and XrdCmsPrepare().
XrdOucMsubs* XrdCmsPrepare::prepMsg [private] |
Referenced by Add(), and setParms().
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 Reset(), setParms(), and XrdCmsPrepare().
int XrdCmsPrepare::scrub2rst [private] |
Referenced by Reset(), Scrub(), setParms(), and XrdCmsPrepare().
int XrdCmsPrepare::scrubtime [private] |
Referenced by DoIt(), setParms(), and XrdCmsPrepare().
1.7.1