xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdCms
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
XrdOucStream
;
37
class
XrdSysError
;
38
39
#define ODC_FAILOVER 'f'
40
#define ODC_ROUNDROB 'r'
41
42
class
XrdCmsClientConfig
43
{
44
public
:
45
46
enum
configHow
{
configMeta
= 1,
configNorm
= 2,
configProxy
= 4};
47
enum
configWhat
{
configMan
= 1,
configSuper
= 2,
configServer
= 4};
48
49
int
Configure
(
const
char
*cfn,
configWhat
What,
configHow
How);
50
51
int
ConWait
;
// Seconds to wait for a manager connection
52
int
RepWait
;
// Seconds to wait for manager replies
53
int
RepWaitMS
;
// RepWait*1000 for poll()
54
int
RepDelay
;
// Seconds to delay before retrying manager
55
int
RepNone
;
// Max number of consecutive non-responses
56
int
PrepWait
;
// Millisecond wait between prepare requests
57
int
FwdWait
;
// Millisecond wait between foward requests
58
int
haveMeta
;
// Have a meta manager (only if we are a manager)
59
60
char
*
CMSPath
;
// Path to the local cmsd for target nodes
61
char
*
myHost
;
62
const
char
*
myName
;
63
64
XrdOucTList
*
ManList
;
// List of managers for remote redirection
65
XrdOucTList
*
PanList
;
// List of managers for proxy redirection
66
unsigned
char
SMode
;
// Manager selection mode
67
unsigned
char
SModeP
;
// Manager selection mode (proxy)
68
69
enum
{
FailOver
=
'f'
,
RoundRob
=
'r'
};
70
71
XrdCmsClientConfig
() :
ConWait
(10),
RepWait
(3),
RepWaitMS
(3000),
72
RepDelay
(5),
RepNone
(8),
PrepWait
(33),
73
FwdWait
(0),
haveMeta
(0),
CMSPath
(0),
74
myHost
(0),
myName
(0),
75
ManList
(0),
PanList
(0),
76
SMode
(
FailOver
),
SModeP
(
FailOver
),
77
isMeta
(0),
isMan
(0) {}
78
~XrdCmsClientConfig
();
79
80
private
:
81
int
isMeta
;
// We are a meta manager
82
int
isMan
;
// We are a manager
83
84
int
ConfigProc
(
const
char
*cfn);
85
int
ConfigXeq
(
char
*var,
XrdOucStream
&
Config
);
86
int
xapath
(
XrdOucStream
&
Config
);
87
int
xconw
(
XrdOucStream
&
Config
);
88
int
xmang
(
XrdOucStream
&
Config
);
89
int
xreqs
(
XrdOucStream
&
Config
);
90
int
xtrac
(
XrdOucStream
&
Config
);
91
};
92
#endif
Generated by
1.8.3.1