|
xrootd
|
#include <XrdCmsFinder.hh>


Public Member Functions | |
| void | Added (const char *path, int Pend=0) |
| int | Configure (const char *cfn, char *Args, XrdOucEnv *EnvInfo) |
| int | Locate (XrdOucErrInfo &Resp, const char *path, int flags, XrdOucEnv *Info=0) |
| int | Prepare (XrdOucErrInfo &Resp, XrdSfsPrep &pargs, XrdOucEnv *Info=0) |
| void | Removed (const char *path) |
| int | RunAdmin (char *Path) |
| int | Space (XrdOucErrInfo &Resp, const char *path, XrdOucEnv *envP=0) |
| void * | Start () |
| XrdCmsFinderTRG (XrdSysLogger *, int, int, XrdOss *theSS=0) | |
| ~XrdCmsFinderTRG () | |
Static Public Member Functions | |
| static bool | VCheck (XrdVersionInfo &urVersion) |
Private Member Functions | |
| void | Hookup () |
| int | Process (XrdCmsRRData &Data) |
Private Attributes | |
| XrdOss * | SS |
| XrdOucStream * | CMSp |
| XrdSysMutex | myData |
| int | myPort |
| char * | CMSPath |
| char * | Login |
| int | isRedir |
| int | isProxy |
| int | Active |
| XrdCmsFinderTRG::XrdCmsFinderTRG | ( | XrdSysLogger * | lp, |
| int | whoami, | ||
| int | port, | ||
| XrdOss * | theSS = 0 |
||
| ) |
References Active, CMSp, CMSPath, isProxy, XrdCms::IsProxy, isRedir, XrdCms::IsRedir, Login, myPort, XrdMonCtrCollector::port, Say, and SS.
| void XrdCmsFinderTRG::Added | ( | const char * | path, |
| int | Pend = 0 |
||
| ) | [virtual] |
Notify the cms of a newly added file or a file whose state has changed on a data server node.
| path | The logical file name. |
| Pend | When true, the file is scheduled to be present in the future (e.g. copied in). |
Reimplemented from XrdCmsClient.
References Active, XrdOucStream::Close(), CMSp, XrdSysMutex::Lock(), myData, XrdOucStream::Put(), and XrdSysMutex::UnLock().
| int XrdCmsFinderTRG::Configure | ( | const char * | cfn, |
| char * | Parms, | ||
| XrdOucEnv * | EnvInfo | ||
| ) | [virtual] |
Configure the client object.
| cfn | The configuration file name. |
| Parms | Any parameters specified in the cmslib directive. If none, the pointer may be null. |
| EnvInfo | Environmental information of the caller. |
Implements XrdCmsClient.
References XrdCmsClientConfig::CMSPath, XrdCmsClientConfig::configNorm, XrdCmsClientConfig::configServer, XrdCmsClientConfig::configSuper, XrdCmsClientConfig::Configure(), isRedir, and RunAdmin().
| void XrdCmsFinderTRG::Hookup | ( | ) | [private] |
References Active, XrdOucStream::Attach(), CMSp, CMSPath, XrdSysMutex::Lock(), myData, opts, Say, stat(), XrdSysMutex::UnLock(), XrdSysTimer::Wait(), and XRDNET_NOEMSG.
Referenced by Start().
| int XrdCmsFinderTRG::Locate | ( | XrdOucErrInfo & | Resp, |
| const char * | path, | ||
| int | flags, | ||
| XrdOucEnv * | Info = 0 |
||
| ) | [inline, virtual] |
Retrieve file location information.
| Resp | Object where message or response is to be returned. |
| path | The logical path whise location is wanted. |
| flags | One or more of the following: |
SFS_O_LOCATE - return the list of servers that have the file. Otherwise, redirect to the best server for the file. SFS_O_NOWAIT - w/ SFS_O_LOCATE return readily available info. Otherwise, select online files only. SFS_O_CREAT - file will be created. SFS_O_NOWAIT - select server if file is online. SFS_O_REPLICA - a replica of the file will be made. SFS_O_STAT - only stat() information wanted. SFS_O_TRUNC - file will be truncated.
For any the the above, additional flags are passed: SFS_O_META - data will not change (inode operation only) SFS_O_RESET - reset cached info and recaculate the location(s). SFS_O_WRONLY - file will be only written (o/w RDWR or RDONLY). SFS_O_RDWR - file may be read and written (o/w WRONLY or RDONLY).
| Info | Associated environmental information for arg2 (e.g., cgi info which can be retrieved by Env1->Env(<len>)). |
Implements XrdCmsClient.
| int XrdCmsFinderTRG::Prepare | ( | XrdOucErrInfo & | Resp, |
| XrdSfsPrep & | pargs, | ||
| XrdOucEnv * | Info = 0 |
||
| ) | [inline, virtual] |
Start the preparation of a file for future processing.
| Resp | Object where message or response is to be returned. |
| pargs | Information on which and how to prepare the file. |
| Info | Associated environmental information. |
Reimplemented from XrdCmsClient.
| int XrdCmsFinderTRG::Process | ( | XrdCmsRRData & | Data | ) | [private] |
References XrdCmsRRData::Blen, XrdCmsRRData::Buff, XrdCms::CmsRRHdr::datalen, DEBUG, XrdCmsRRData::Dlen, EPNAME, XrdCmsRRData::getBuff(), XrdCms::kYR_mv, XrdCms::kYR_rm, XrdCms::kYR_rmdir, XrdCmsParser::Parse(), XrdCms::Parser, XrdCmsRRData::Path, XrdCmsRRData::Path2, XrdOss::Remdir(), XrdOss::Rename(), XrdCmsRRData::Request, XrdCmsRRData::Routing, XrdCms::CmsRRHdr::rrCode, Say, SS, and XrdOss::Unlink().
Referenced by Start().
| void XrdCmsFinderTRG::Removed | ( | const char * | path | ) | [virtual] |
Notify the cmsd that a file or directory has been deleted. It is only called called on a data server node.
| path | The logical file name that was removed. |
Reimplemented from XrdCmsClient.
References Active, XrdOucStream::Close(), CMSp, XrdSysMutex::Lock(), myData, XrdOucStream::Put(), and XrdSysMutex::UnLock().
| int XrdCmsFinderTRG::RunAdmin | ( | char * | Path | ) |
References CMSPath, XrdSysThread::Run(), Say, and XrdCmsStartRsp().
Referenced by XrdCmsFinderRMT::Configure(), and Configure().
| int XrdCmsFinderTRG::Space | ( | XrdOucErrInfo & | Resp, |
| const char * | path, | ||
| XrdOucEnv * | Info = 0 |
||
| ) | [inline, virtual] |
Obtain the overall space usage of a cluster. Called only on manager nodes.
| Resp | Object to hold response or error message. |
| path | Associated logical path for the space request. |
| Info | Associated cgi information for path. |
Implements XrdCmsClient.
| void * XrdCmsFinderTRG::Start | ( | ) |
References Active, XrdOucStream::Close(), CMSp, CMSPath, XrdOucStream::FDNum(), Hookup(), XrdSysMutex::Lock(), Login, myData, Process(), XrdOucStream::Put(), XrdCmsRRData::Request, XrdCmsRRData::Routing, Say, XrdSysMutex::UnLock(), and XrdSysTimer::Wait().
Referenced by XrdCmsStartRsp().
| bool XrdCmsFinderTRG::VCheck | ( | XrdVersionInfo & | urVersion | ) | [static] |
References XrdSysPlugin::VerCmp().
Referenced by XrdOfs::ConfigRedir().
int XrdCmsFinderTRG::Active [private] |
Referenced by Added(), Hookup(), Removed(), Start(), and XrdCmsFinderTRG().
XrdOucStream* XrdCmsFinderTRG::CMSp [private] |
Referenced by Added(), Hookup(), Removed(), Start(), XrdCmsFinderTRG(), and ~XrdCmsFinderTRG().
char* XrdCmsFinderTRG::CMSPath [private] |
Referenced by Hookup(), RunAdmin(), Start(), and XrdCmsFinderTRG().
int XrdCmsFinderTRG::isProxy [private] |
Referenced by XrdCmsFinderTRG().
int XrdCmsFinderTRG::isRedir [private] |
Referenced by Configure(), and XrdCmsFinderTRG().
char* XrdCmsFinderTRG::Login [private] |
Referenced by Start(), XrdCmsFinderTRG(), and ~XrdCmsFinderTRG().
XrdSysMutex XrdCmsFinderTRG::myData [private] |
int XrdCmsFinderTRG::myPort [private] |
Referenced by XrdCmsFinderTRG().
XrdOss* XrdCmsFinderTRG::SS [private] |
Referenced by Process(), and XrdCmsFinderTRG().
1.7.6.1