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
36
class
XrdCmsPerfMon
;
37
class
XrdOucStream
;
38
class
XrdSysError
;
39
40
#define ODC_FAILOVER 'f'
41
#define ODC_ROUNDROB 'r'
42
43
class
XrdCmsClientConfig
44
{
45
public
:
46
47
enum
configHow
{
configMeta
= 1,
configNorm
= 2,
configProxy
= 4};
48
enum
configWhat
{
configMan
= 1,
configSuper
= 2,
configServer
= 4};
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 forward 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
76
XrdCmsClientConfig
(
XrdCmsPerfMon
*cmsmon=0)
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),
83
SMode
(
FailOver
),
SModeP
(
FailOver
),
84
VNID_Lib(0), VNID_Parms(0),
85
prfLib(0), prfParms(0), cmsMon(cmsmon),
86
isMeta(false), isMan(false), isServer(false) {}
87
~XrdCmsClientConfig
();
88
89
private
:
90
91
char
*VNID_Lib;
92
char
*VNID_Parms;
93
char
*prfLib;
94
char
*prfParms;
95
96
XrdCmsPerfMon
*cmsMon;
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);
105
int
xapath(
XrdOucStream
&Config);
106
int
xcidt(
XrdOucStream
&Config);
107
int
xconw(
XrdOucStream
&Config);
108
int
xmang(
XrdOucStream
&Config);
109
int
xperf(
XrdOucStream
&Config);
110
int
xreqs(
XrdOucStream
&Config);
111
int
xtrac(
XrdOucStream
&Config);
112
int
xvnid(
XrdOucStream
&Config);
113
};
114
#endif
XrdOucTList.hh
XrdOuca2x.hh
XrdCmsClientConfig
Definition
XrdCmsClientConfig.hh:44
XrdCmsClientConfig::myName
const char * myName
Definition
XrdCmsClientConfig.hh:63
XrdCmsClientConfig::RepWaitMS
int RepWaitMS
Definition
XrdCmsClientConfig.hh:54
XrdCmsClientConfig::perfInt
int perfInt
Definition
XrdCmsClientConfig.hh:70
XrdCmsClientConfig::RepNone
int RepNone
Definition
XrdCmsClientConfig.hh:56
XrdCmsClientConfig::cidTag
char * cidTag
Definition
XrdCmsClientConfig.hh:65
XrdCmsClientConfig::myHost
const char * myHost
Definition
XrdCmsClientConfig.hh:62
XrdCmsClientConfig::perfMon
XrdCmsPerfMon * perfMon
Definition
XrdCmsClientConfig.hh:69
XrdCmsClientConfig::FwdWait
int FwdWait
Definition
XrdCmsClientConfig.hh:58
XrdCmsClientConfig::Configure
int Configure(const char *cfn, configWhat What, configHow How)
Definition
XrdCmsClientConfig.cc:93
XrdCmsClientConfig::SMode
unsigned char SMode
Definition
XrdCmsClientConfig.hh:71
XrdCmsClientConfig::SModeP
unsigned char SModeP
Definition
XrdCmsClientConfig.hh:72
XrdCmsClientConfig::PrepWait
int PrepWait
Definition
XrdCmsClientConfig.hh:57
XrdCmsClientConfig::XrdCmsClientConfig
XrdCmsClientConfig(XrdCmsPerfMon *cmsmon=0)
Definition
XrdCmsClientConfig.hh:76
XrdCmsClientConfig::configWhat
configWhat
Definition
XrdCmsClientConfig.hh:48
XrdCmsClientConfig::configSuper
@ configSuper
Definition
XrdCmsClientConfig.hh:48
XrdCmsClientConfig::configMan
@ configMan
Definition
XrdCmsClientConfig.hh:48
XrdCmsClientConfig::configServer
@ configServer
Definition
XrdCmsClientConfig.hh:48
XrdCmsClientConfig::haveMeta
int haveMeta
Definition
XrdCmsClientConfig.hh:59
XrdCmsClientConfig::ManList
XrdOucTList * ManList
Definition
XrdCmsClientConfig.hh:67
XrdCmsClientConfig::myVNID
char * myVNID
Definition
XrdCmsClientConfig.hh:64
XrdCmsClientConfig::CMSPath
char * CMSPath
Definition
XrdCmsClientConfig.hh:61
XrdCmsClientConfig::~XrdCmsClientConfig
~XrdCmsClientConfig()
Definition
XrdCmsClientConfig.cc:74
XrdCmsClientConfig::FailOver
@ FailOver
Definition
XrdCmsClientConfig.hh:74
XrdCmsClientConfig::RoundRob
@ RoundRob
Definition
XrdCmsClientConfig.hh:74
XrdCmsClientConfig::PanList
XrdOucTList * PanList
Definition
XrdCmsClientConfig.hh:68
XrdCmsClientConfig::configHow
configHow
Definition
XrdCmsClientConfig.hh:47
XrdCmsClientConfig::configProxy
@ configProxy
Definition
XrdCmsClientConfig.hh:47
XrdCmsClientConfig::configNorm
@ configNorm
Definition
XrdCmsClientConfig.hh:47
XrdCmsClientConfig::configMeta
@ configMeta
Definition
XrdCmsClientConfig.hh:47
XrdCmsClientConfig::ConWait
int ConWait
Definition
XrdCmsClientConfig.hh:52
XrdCmsClientConfig::RepWait
int RepWait
Definition
XrdCmsClientConfig.hh:53
XrdCmsClientConfig::RepDelay
int RepDelay
Definition
XrdCmsClientConfig.hh:55
XrdCmsPerfMon
Definition
XrdCmsPerfMon.hh:46
XrdOucStream
Definition
XrdOucStream.hh:47
XrdOucTList
Definition
XrdOucTList.hh:42
XrdSysError
Definition
XrdSysError.hh:90
XrdCms
XrdCmsClientConfig.hh
Generated by
1.11.0