#include <XrdCmsClient.hh>
Public Types | |
amLocal | |
Not affiliated with a cluster. | |
amRemote | |
Am a manager an issue redirects. | |
amTarget | |
Am a server an field redirects. | |
enum | Persona { amLocal, amRemote, amTarget } |
Public Member Functions | |
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 |
XrdCmsClient (Persona acting) | |
virtual | ~XrdCmsClient () |
Destructor. | |
Protected Attributes | |
Persona | myPersona |
XrdCmsClient::XrdCmsClient | ( | Persona | acting | ) | [inline] |
virtual XrdCmsClient::~XrdCmsClient | ( | ) | [inline, virtual] |
Destructor.
virtual void XrdCmsClient::Added | ( | const char * | path, | |
int | Pend = 0 | |||
) | [inline, 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). |
virtual int XrdCmsClient::Configure | ( | const char * | cfn, | |
char * | Parms, | |||
XrdOucEnv * | EnvInfo | |||
) | [pure 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. |
virtual int XrdCmsClient::Forward | ( | XrdOucErrInfo & | Resp, | |
const char * | cmd, | |||
const char * | arg1 = 0 , |
|||
const char * | arg2 = 0 , |
|||
XrdOucEnv * | Env1 = 0 , |
|||
XrdOucEnv * | Env2 = 0 | |||
) | [inline, virtual] |
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.
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>)). |
virtual int XrdCmsClient::isRemote | ( | ) | [inline, virtual] |
Check if this client is configured for a manager node.
virtual int XrdCmsClient::Locate | ( | XrdOucErrInfo & | Resp, | |
const char * | path, | |||
int | flags, | |||
XrdOucEnv * | Info = 0 | |||
) | [pure 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: |
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>)). |
virtual XrdOucTList* XrdCmsClient::Managers | ( | ) | [inline, virtual] |
Obtain the list of cmsd's being used by a manager node along with their associated index numbers, origin 1.
virtual int XrdCmsClient::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. |
virtual int XrdCmsClient::Release | ( | int | n = 1 |
) | [inline, virtual] |
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.
n | The value to add to the resources available (default 1). The total amount is capped by the amount specified by Resource(). |
virtual void XrdCmsClient::Removed | ( | const char * | path | ) | [inline, 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. |
virtual int XrdCmsClient::Reserve | ( | int | n = 1 |
) | [inline, virtual] |
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.
n | The value by which resources are decreased (default 1). |
virtual int XrdCmsClient::Resource | ( | int | n | ) | [inline, virtual] |
virtual void XrdCmsClient::Resume | ( | int | Perm = 1 |
) | [inline, virtual] |
Resume service after a suspension.
Perm | When true the resume persist across server restarts. Otherwise, it is treated as a temporary request. |
virtual int XrdCmsClient::Space | ( | XrdOucErrInfo & | Resp, | |
const char * | path, | |||
XrdOucEnv * | Info = 0 | |||
) | [pure 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. |
virtual void XrdCmsClient::Suspend | ( | int | Perm = 1 |
) | [inline, virtual] |
Suspend service.
Perm | When true the suspend persist across server restarts. Otherwise, it is treated as a temporary request. |
Persona XrdCmsClient::myPersona [protected] |