#include <XrdCmsClient.hh>
|
virtual void | Added (const char *path, int Pend=0) |
|
virtual int | Configure (const char *cfn, char *Parms, XrdOucEnv *EnvInfo)=0 |
|
virtual int | Forward (XrdOucErrInfo &Resp, const char *cmd, const char *arg1=0, const char *arg2=0, XrdOucEnv *Env1=0, XrdOucEnv *Env2=0) |
|
virtual int | isRemote () |
|
virtual int | Locate (XrdOucErrInfo &Resp, const char *path, int flags, XrdOucEnv *Info=0)=0 |
|
virtual XrdOucTList * | Managers () |
|
virtual int | Prepare (XrdOucErrInfo &Resp, XrdSfsPrep &pargs, XrdOucEnv *Info=0) |
|
virtual void | Removed (const char *path) |
|
virtual void | Resume (int Perm=1) |
|
virtual void | Suspend (int Perm=1) |
|
virtual int | Resource (int n) |
|
virtual int | Reserve (int n=1) |
|
virtual int | Release (int n=1) |
|
virtual int | Space (XrdOucErrInfo &Resp, const char *path, XrdOucEnv *Info=0)=0 |
|
virtual void | Utilization (unsigned int util, bool alert=false) |
|
| XrdCmsClient (Persona acting) |
|
virtual | ~XrdCmsClient () |
| Destructor.
|
|
◆ Persona
Constructor
- Parameters
-
acting | The type of function this object is performing. |
Enumerator |
---|
amLocal | Not affiliated with a cluster.
|
amRemote | Am a manager and issue redirects.
|
amTarget | Am a server and field redirects.
|
◆ XrdCmsClient()
XrdCmsClient::XrdCmsClient |
( |
Persona |
acting | ) |
|
|
inline |
◆ ~XrdCmsClient()
virtual XrdCmsClient::~XrdCmsClient |
( |
| ) |
|
|
inlinevirtual |
◆ Added()
virtual void XrdCmsClient::Added |
( |
const char * |
path, |
|
|
int |
Pend = 0 |
|
) |
| |
|
inlinevirtual |
◆ Configure()
virtual int XrdCmsClient::Configure |
( |
const char * |
cfn, |
|
|
char * |
Parms, |
|
|
XrdOucEnv * |
EnvInfo |
|
) |
| |
|
pure virtual |
Configure the client object.
- Parameters
-
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. |
- Returns
- Success !0 Failure =0
Implemented in XrdCmsFinderRMT, XrdCmsFinderTRG, and XrdCmsRedirLocal.
◆ Forward()
virtual int XrdCmsClient::Forward |
( |
XrdOucErrInfo & |
Resp, |
|
|
const char * |
cmd, |
|
|
const char * |
arg1 = 0 , |
|
|
const char * |
arg2 = 0 , |
|
|
XrdOucEnv * |
Env1 = 0 , |
|
|
XrdOucEnv * |
Env2 = 0 |
|
) |
| |
|
inlinevirtual |
Relay a meta-operation to all nodes in the cluster.
This method is only used on manager nodes and is enabled by the ofs.forward directive.
- Parameters
-
Resp | Object where messages are to be returned. |
cmd | The operation being performed (see table below). If it starts with a '+' then a response (2way) is needed. Otherwise, a best-effort is all that is all that is required and success can always be returned. |
arg1 | 1st argument to cmd. |
arg2 | 2nd argument to cmd, which may be null if none exists. |
Env1 | Associated environmental information for arg1 (e.g., cgi info which can be retrieved by Env1->Env(<len>)). |
Env2 | Associated environmental information for arg2 (e.g., cgi info which can be retrieved by Env1->Env(<len>)). |
cmd arg1 arg2 cmd arg1 arg2
-------- ------ ------ -------- ------ ------
[+]chmod <path> <mode %o> [+]rmdir <path> 0
[+]mkdir <path> <mode %o> [+]mv <oldp> <newp>
[+]mkpath <path> <mode %o> [+]trunc <path> <size %lld>
[+]rm <path> 0
- Returns
- As explained under "return conventions".
Reimplemented in XrdCmsFinderRMT, and XrdCmsRedirLocal.
Referenced by XrdCmsRedirLocal::Forward().
◆ isRemote()
virtual int XrdCmsClient::isRemote |
( |
| ) |
|
|
inlinevirtual |
◆ Locate()
Retrieve file location information.
- Parameters
-
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>)). |
- Returns
- As explained under "return conventions".
Implemented in XrdCmsRedirLocal, XrdCmsFinderRMT, and XrdCmsFinderTRG.
◆ Managers()
◆ Prepare()
Start the preparation of a file for future processing.
- Parameters
-
Resp | Object where message or response is to be returned. |
pargs | Information on which and how to prepare the file. |
Info | Associated environmental information. |
- Returns
- As explained under "return conventions".
Reimplemented in XrdCmsFinderRMT, XrdCmsFinderTRG, and XrdCmsRedirLocal.
Referenced by XrdCmsRedirLocal::Prepare().
◆ Release()
virtual int XrdCmsClient::Release |
( |
int |
n = 1 | ) |
|
|
inlinevirtual |
Increases the amount of resource available. When transitioning from a a non-positive to a positive resource amount, perform a resume so that additional clients may be dispatched to this data server.
- Parameters
-
n | The value to add to the resources available (default 1). The total amount is capped by the amount specified by Resource(). |
- Returns
- The amount of resource left.
Reimplemented in XrdCmsFinderTRG, and XrdCmsRedirLocal.
Referenced by XrdCmsRedirLocal::Release(), and XrdSsiCms::Release().
◆ Removed()
virtual void XrdCmsClient::Removed |
( |
const char * |
path | ) |
|
|
inlinevirtual |
◆ Reserve()
virtual int XrdCmsClient::Reserve |
( |
int |
n = 1 | ) |
|
|
inlinevirtual |
Decreases the amount of resources available. When the available resources becomes non-positive, perform a temporary suspend to prevent additional clients from being dispatched to this data server.
- Parameters
-
n | The value by which resources are decreased (default 1). |
- Returns
- The amount of resource left.
Reimplemented in XrdCmsFinderTRG, and XrdCmsRedirLocal.
Referenced by XrdCmsRedirLocal::Reserve(), and XrdSsiCms::Reserve().
◆ Resource()
virtual int XrdCmsClient::Resource |
( |
int |
n | ) |
|
|
inlinevirtual |
◆ Resume()
virtual void XrdCmsClient::Resume |
( |
int |
Perm = 1 | ) |
|
|
inlinevirtual |
◆ Space()
Obtain the overall space usage of a cluster. Called only on manager nodes.
- Parameters
-
Resp | Object to hold response or error message. |
path | Associated logical path for the space request. |
Info | Associated cgi information for path. |
- Returns
- Space information as defined by the response to kYR_statfs. For a typical implementation see XrdCmsNode::do_StatFS().
Implemented in XrdCmsRedirLocal, XrdCmsFinderTRG, and XrdCmsFinderRMT.
◆ Suspend()
virtual void XrdCmsClient::Suspend |
( |
int |
Perm = 1 | ) |
|
|
inlinevirtual |
◆ Utilization()
virtual void XrdCmsClient::Utilization |
( |
unsigned int |
util, |
|
|
bool |
alert = false |
|
) |
| |
|
inlinevirtual |
Report utilization of this server. This may be used in lieu of general performance metric reporting. For consistent results use only one method.
- Parameters
-
util | A value from 0 to 100 representing utilization. Values greater than 100 are set to be 100. |
alert | When true the utilization is forcibly report to the cluster managers. Otherwise, reporting is done only when it will significantly change server selection. |
Reimplemented in XrdCmsFinderTRG.
Referenced by XrdSsiCms::Utilization().
◆ myPersona
The documentation for this class was generated from the following file: