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 
36 class XrdCmsPerfMon;
37 class XrdOucStream;
38 class XrdSysError;
39 
40 #define ODC_FAILOVER 'f'
41 #define ODC_ROUNDROB 'r'
42 
44 {
45 public:
46 
49 
50 int Configure(const char *cfn, configWhat What, configHow How);
51 
52 int ConWait; // Seconds to wait for a manager connection
53 int RepWait; // Seconds to wait for manager replies
54 int RepWaitMS; // RepWait*1000 for poll()
55 int RepDelay; // Seconds to delay before retrying manager
56 int RepNone; // Max number of consecutive non-responses
57 int PrepWait; // Millisecond wait between prepare requests
58 int FwdWait; // Millisecond wait between foward requests
59 int haveMeta; // Have a meta manager (only if we are a manager)
60 
61 char *CMSPath; // Path to the local cmsd for target nodes
62 const char *myHost;
63 const char *myName;
64  char *myVNID;
65  char *cidTag;
66 
67 XrdOucTList *ManList; // List of managers for remote redirection
68 XrdOucTList *PanList; // List of managers for proxy redirection
69 XrdCmsPerfMon *perfMon; // Performance monitor plugin
70 int perfInt; // Performance poll interval
71 unsigned char SMode; // Manager selection mode
72 unsigned char SModeP; // Manager selection mode (proxy)
73 
74 enum {FailOver = 'f', RoundRob = 'r'};
75 
77  : ConWait(10), RepWait(3), RepWaitMS(3000),
78  RepDelay(5), RepNone(8), PrepWait(33),
79  FwdWait(0), haveMeta(0), CMSPath(0),
80  myHost(0), myName(0), myVNID(0),
81  cidTag(0), ManList(0), PanList(0),
82  perfMon(0), perfInt(3*60),
84  VNID_Lib(0), VNID_Parms(0),
85  prfLib(0), prfParms(0), cmsMon(cmsmon),
86  isMeta(false), isMan(false), isServer(false) {}
88 
89 private:
90 
91 char *VNID_Lib;
92 char *VNID_Parms;
93 char *prfLib;
94 char *prfParms;
95 
97 
98 bool isMeta; // We are a meta manager
99 bool isMan; // We are a manager
100 bool isServer; // We are a server
101 
102 int ConfigProc(const char *cfn);
103 bool ConfigSID(const char *cFile, XrdOucTList *tpl, char sfx);
104 int ConfigXeq(char *var, XrdOucStream &Config);
113 };
114 #endif
char * prfParms
Definition: XrdCmsClientConfig.hh:94
int xtrac(XrdOucStream &Config)
XrdOucTList * PanList
Definition: XrdCmsClientConfig.hh:68
XrdCmsPerfMon * cmsMon
Definition: XrdCmsClientConfig.hh:96
int xreqs(XrdOucStream &Config)
int RepNone
Definition: XrdCmsClientConfig.hh:56
configWhat
Definition: XrdCmsClientConfig.hh:48
XrdOucTList * ManList
Definition: XrdCmsClientConfig.hh:67
Definition: XrdCmsClientConfig.hh:43
Definition: XrdOucStream.hh:46
Definition: XrdCmsClientConfig.hh:47
XrdCmsPerfMon * perfMon
Definition: XrdCmsClientConfig.hh:69
bool isMan
Definition: XrdCmsClientConfig.hh:99
bool ConfigSID(const char *cFile, XrdOucTList *tpl, char sfx)
int ConfigXeq(char *var, XrdOucStream &Config)
int xmang(XrdOucStream &Config)
int ConfigProc(const char *cfn)
bool isServer
Definition: XrdCmsClientConfig.hh:100
Definition: XrdSysError.hh:89
XrdCmsClientConfig(XrdCmsPerfMon *cmsmon=0)
Definition: XrdCmsClientConfig.hh:76
Definition: XrdCmsClientConfig.hh:48
configHow
Definition: XrdCmsClientConfig.hh:47
int Configure(const char *cfn, configWhat What, configHow How)
char * VNID_Lib
Definition: XrdCmsClientConfig.hh:91
Definition: XrdCmsClientConfig.hh:74
XrdCmsConfig Config
int RepWaitMS
Definition: XrdCmsClientConfig.hh:54
unsigned char SMode
Definition: XrdCmsClientConfig.hh:71
char * VNID_Parms
Definition: XrdCmsClientConfig.hh:92
unsigned char SModeP
Definition: XrdCmsClientConfig.hh:72
Definition: XrdCmsClientConfig.hh:47
Definition: XrdOucTList.hh:41
int RepWait
Definition: XrdCmsClientConfig.hh:53
Definition: XrdCmsClientConfig.hh:74
int xconw(XrdOucStream &Config)
int xapath(XrdOucStream &Config)
char * prfLib
Definition: XrdCmsClientConfig.hh:93
Definition: XrdCmsClientConfig.hh:48
Definition: XrdCmsClientConfig.hh:47
int ConWait
Definition: XrdCmsClientConfig.hh:52
const char * myHost
Definition: XrdCmsClientConfig.hh:62
char * CMSPath
Definition: XrdCmsClientConfig.hh:61
int perfInt
Definition: XrdCmsClientConfig.hh:70
int PrepWait
Definition: XrdCmsClientConfig.hh:57
Definition: XrdCmsClientConfig.hh:48
const char * myName
Definition: XrdCmsClientConfig.hh:63
int RepDelay
Definition: XrdCmsClientConfig.hh:55
int FwdWait
Definition: XrdCmsClientConfig.hh:58
char * cidTag
Definition: XrdCmsClientConfig.hh:65
int xcidt(XrdOucStream &Config)
bool isMeta
Definition: XrdCmsClientConfig.hh:98
char * myVNID
Definition: XrdCmsClientConfig.hh:64
int haveMeta
Definition: XrdCmsClientConfig.hh:59
Definition: XrdCmsPerfMon.hh:45
int xvnid(XrdOucStream &Config)
int xperf(XrdOucStream &Config)