xrootd
XrdCmsClientConfig.hh
Go to the documentation of this file.
1#ifndef _CMS_CLIENTCONFIG_H
2#define _CMS_CLIENTCONFIG_H
3/******************************************************************************/
4/* */
5/* X r d C m s C l i e n t C o n f i g . h h */
6/* */
7/* (c) 2007 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* All Rights Reserved */
9/* Produced by Andrew Hanushevsky for Stanford University under contract */
10/* DE-AC02-76-SFO0515 with the Department of Energy */
11/* */
12/* This file is part of the XRootD software suite. */
13/* */
14/* XRootD is free software: you can redistribute it and/or modify it under */
15/* the terms of the GNU Lesser General Public License as published by the */
16/* Free Software Foundation, either version 3 of the License, or (at your */
17/* option) any later version. */
18/* */
19/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22/* License for more details. */
23/* */
24/* You should have received a copy of the GNU Lesser General Public License */
25/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27/* */
28/* The copyright holder's institutional names and contributor's names may not */
29/* be used to endorse or promote products derived from this software without */
30/* specific prior written permission of the institution or contributor. */
31/******************************************************************************/
32
33#include "XrdOuc/XrdOucTList.hh"
34#include "XrdOuc/XrdOuca2x.hh"
35
36class XrdOucStream;
37class XrdSysError;
38
39#define ODC_FAILOVER 'f'
40#define ODC_ROUNDROB 'r'
41
43{
44public:
45
48
49int Configure(const char *cfn, configWhat What, configHow How);
50
51int ConWait; // Seconds to wait for a manager connection
52int RepWait; // Seconds to wait for manager replies
53int RepWaitMS; // RepWait*1000 for poll()
54int RepDelay; // Seconds to delay before retrying manager
55int RepNone; // Max number of consecutive non-responses
56int PrepWait; // Millisecond wait between prepare requests
57int FwdWait; // Millisecond wait between foward requests
58int haveMeta; // Have a meta manager (only if we are a manager)
59
60char *CMSPath; // Path to the local cmsd for target nodes
61const char *myHost;
62const char *myName;
63 char *myVNID;
64 char *cidTag;
65
66XrdOucTList *ManList; // List of managers for remote redirection
67XrdOucTList *PanList; // List of managers for proxy redirection
68unsigned char SMode; // Manager selection mode
69unsigned char SModeP; // Manager selection mode (proxy)
70
71enum {FailOver = 'f', RoundRob = 'r'};
72
74 RepDelay(5), RepNone(8), PrepWait(33),
75 FwdWait(0), haveMeta(0), CMSPath(0),
76 myHost(0), myName(0), myVNID(0),
77 cidTag(0), ManList(0), PanList(0),
79 VNID_Lib(0), VNID_Parms(0),
80 isMeta(0), isMan(0) {}
82
83private:
86
87int isMeta; // We are a meta manager
88int isMan; // We are a manager
89
90int ConfigProc(const char *cfn);
91bool ConfigSID(const char *cFile, XrdOucTList *tpl, char sfx);
92int ConfigXeq(char *var, XrdOucStream &Config);
100};
101#endif
Definition: XrdCmsClientConfig.hh:43
const char * myName
Definition: XrdCmsClientConfig.hh:62
int RepWaitMS
Definition: XrdCmsClientConfig.hh:53
int RepNone
Definition: XrdCmsClientConfig.hh:55
char * cidTag
Definition: XrdCmsClientConfig.hh:64
const char * myHost
Definition: XrdCmsClientConfig.hh:61
int ConfigProc(const char *cfn)
int isMan
Definition: XrdCmsClientConfig.hh:88
int FwdWait
Definition: XrdCmsClientConfig.hh:57
int Configure(const char *cfn, configWhat What, configHow How)
XrdCmsClientConfig()
Definition: XrdCmsClientConfig.hh:73
int xreqs(XrdOucStream &Config)
bool ConfigSID(const char *cFile, XrdOucTList *tpl, char sfx)
unsigned char SMode
Definition: XrdCmsClientConfig.hh:68
unsigned char SModeP
Definition: XrdCmsClientConfig.hh:69
int xmang(XrdOucStream &Config)
int PrepWait
Definition: XrdCmsClientConfig.hh:56
@ FailOver
Definition: XrdCmsClientConfig.hh:71
@ RoundRob
Definition: XrdCmsClientConfig.hh:71
int ConfigXeq(char *var, XrdOucStream &Config)
int xvnid(XrdOucStream &Config)
configWhat
Definition: XrdCmsClientConfig.hh:47
@ configSuper
Definition: XrdCmsClientConfig.hh:47
@ configMan
Definition: XrdCmsClientConfig.hh:47
@ configServer
Definition: XrdCmsClientConfig.hh:47
int xtrac(XrdOucStream &Config)
int haveMeta
Definition: XrdCmsClientConfig.hh:58
XrdOucTList * ManList
Definition: XrdCmsClientConfig.hh:66
char * myVNID
Definition: XrdCmsClientConfig.hh:63
int xcidt(XrdOucStream &Config)
int isMeta
Definition: XrdCmsClientConfig.hh:87
char * CMSPath
Definition: XrdCmsClientConfig.hh:60
char * VNID_Parms
Definition: XrdCmsClientConfig.hh:85
XrdOucTList * PanList
Definition: XrdCmsClientConfig.hh:67
configHow
Definition: XrdCmsClientConfig.hh:46
@ configProxy
Definition: XrdCmsClientConfig.hh:46
@ configNorm
Definition: XrdCmsClientConfig.hh:46
@ configMeta
Definition: XrdCmsClientConfig.hh:46
int xconw(XrdOucStream &Config)
int xapath(XrdOucStream &Config)
char * VNID_Lib
Definition: XrdCmsClientConfig.hh:84
int ConWait
Definition: XrdCmsClientConfig.hh:51
int RepWait
Definition: XrdCmsClientConfig.hh:52
int RepDelay
Definition: XrdCmsClientConfig.hh:54
Definition: XrdOucStream.hh:46
Definition: XrdOucTList.hh:42
Definition: XrdSysError.hh:90
XrdCmsConfig Config