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