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 
13 #include "XrdOuc/XrdOucTList.hh"
14 #include "XrdOuc/XrdOuca2x.hh"
15 
16 class XrdOucStream;
17 class XrdSysError;
18 
19 #define ODC_FAILOVER 'f'
20 #define ODC_ROUNDROB 'r'
21 
23 {
24 public:
25 
28 
29 int Configure(const char *cfn, configWhat What, configHow How);
30 
31 int ConWait; // Seconds to wait for a manager connection
32 int RepWait; // Seconds to wait for manager replies
33 int RepWaitMS; // RepWait*1000 for poll()
34 int RepDelay; // Seconds to delay before retrying manager
35 int RepNone; // Max number of consecutive non-responses
36 int PrepWait; // Millisecond wait between prepare requests
37 int FwdWait; // Millisecond wait between foward requests
38 int haveMeta; // Have a meta manager (only if we are a manager)
39 
40 char *CMSPath; // Path to the local cmsd for target nodes
41 char *myHost;
42 const char *myName;
43 
44 XrdOucTList *ManList; // List of managers for remote redirection
45 XrdOucTList *PanList; // List of managers for proxy redirection
46 unsigned char SMode; // Manager selection mode
47 unsigned char SModeP; // Manager selection mode (proxy)
48 
49 enum {FailOver = 'f', RoundRob = 'r'};
50 
52  RepDelay(5), RepNone(8), PrepWait(33),
53  FwdWait(0), haveMeta(0), CMSPath(0),
54  myHost(0), myName(0),
55  ManList(0), PanList(0),
58 
59 private:
60 int isMeta; // We are a meta manager
61 int isMan; // We are a manager
62 
63 int ConfigProc(const char *cfn);
64 int ConfigXeq(char *var, XrdOucStream &Config);
70 };
71 #endif