xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdCms
XrdCmsFinder.hh
Go to the documentation of this file.
1
#ifndef __CMS_FINDER__
2
#define __CMS_FINDER__
3
/******************************************************************************/
4
/* */
5
/* X r d C m s F i n d e r . 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 "
XrdCms/XrdCmsClient.hh
"
34
35
#include "
XrdSys/XrdSysPthread.hh
"
36
37
class
XrdCmsClientMan
;
38
class
XrdOss
;
39
class
XrdOucEnv
;
40
class
XrdOucErrInfo
;
41
class
XrdOucTList
;
42
struct
XrdCmsData;
43
class
XrdCmsRRData
;
44
struct
XrdSfsPrep
;
45
class
XrdSysLogger
;
46
struct
XrdVersionInfo
;
47
48
/******************************************************************************/
49
/* R e m o t e F i n d e r */
50
/******************************************************************************/
51
52
class
XrdCmsFinderRMT
:
public
XrdCmsClient
53
{
54
public
:
55
void
Added
(
const
char
*path,
int
Pend=0) {}
56
57
int
Configure
(
const
char
*cfn,
char
*Args,
XrdOucEnv
*EnvInfo);
58
59
int
Forward
(
XrdOucErrInfo
&Resp,
const
char
*cmd,
60
const
char
*arg1=0,
const
char
*arg2=0,
61
XrdOucEnv
*Env1=0,
XrdOucEnv
*Env2=0);
62
63
int
Locate
(
XrdOucErrInfo
&Resp,
const
char
*path,
int
flags,
64
XrdOucEnv
*
Info
=0);
65
66
XrdOucTList
*
Managers
() {
return
myManList
;}
67
68
int
Prepare
(
XrdOucErrInfo
&Resp,
XrdSfsPrep
&pargs,
69
XrdOucEnv
*
Info
=0);
70
71
void
Removed
(
const
char
*path) {}
72
73
void
setSS
(
XrdOss
*thess) {}
74
75
int
Space
(
XrdOucErrInfo
&Resp,
const
char
*path,
XrdOucEnv
*
Info
=0);
76
77
static
bool
VCheck
(
XrdVersionInfo
&urVersion);
78
79
XrdCmsFinderRMT
(
XrdSysLogger
*lp,
int
whoami=0,
int
Port=0);
80
~XrdCmsFinderRMT
();
81
82
static
const
int
MaxMan
= 15;
83
84
private
:
85
int
Decode
(
char
**resp);
86
void
Inform
(
XrdCmsClientMan
*xman,
struct
iovec xmsg[],
int
xnum);
87
XrdCmsClientMan
*
SelectManager
(
XrdOucErrInfo
&Resp,
const
char
*path);
88
void
SelectManFail
(
XrdOucErrInfo
&Resp);
89
int
send2Man
(
XrdOucErrInfo
&,
const
char
*,
struct
iovec *,
int
);
90
int
StartManagers
(
XrdOucTList
*);
91
92
XrdCmsClientMan
*
myManTable
[
MaxMan
];
93
XrdCmsClientMan
*
myManagers
;
94
XrdOucTList
*
myManList
;
95
int
myManCount
;
96
XrdSysMutex
myData
;
97
char
*
CMSPath
;
98
int
ConWait
;
99
int
RepDelay
;
100
int
RepNone
;
101
int
RepWait
;
102
int
FwdWait
;
103
int
PrepWait
;
104
int
isMeta
;
105
int
isProxy
;
106
int
isTarget
;
107
int
myPort
;
108
unsigned
char
SMode
;
109
unsigned
char
sendID
;
110
unsigned
char
savePath
;
111
};
112
113
/******************************************************************************/
114
/* T a r g e t F i n d e r */
115
/******************************************************************************/
116
117
class
XrdOucStream
;
118
119
class
XrdCmsFinderTRG
:
public
XrdCmsClient
120
{
121
public
:
122
void
Added
(
const
char
*path,
int
Pend=0);
123
124
int
Configure
(
const
char
*cfn,
char
*Args,
XrdOucEnv
*EnvInfo);
125
126
int
Locate
(
XrdOucErrInfo
&Resp,
const
char
*path,
int
flags,
127
XrdOucEnv
*
Info
=0) {
return
0;}
128
129
int
Prepare
(
XrdOucErrInfo
&Resp,
XrdSfsPrep
&pargs,
130
XrdOucEnv
*
Info
=0) {
return
0;}
131
132
void
Removed
(
const
char
*path);
133
134
int
RunAdmin
(
char
*
Path
);
135
136
int
Space
(
XrdOucErrInfo
&Resp,
const
char
*path,
XrdOucEnv
*envP=0)
137
{
return
0;}
138
139
void
*
Start
();
140
141
static
bool
VCheck
(
XrdVersionInfo
&urVersion);
142
143
XrdCmsFinderTRG
(
XrdSysLogger
*,
int
,
int
,
XrdOss
*theSS=0);
144
~XrdCmsFinderTRG
();
145
146
private
:
147
148
void
Hookup
();
149
int
Process
(
XrdCmsRRData
&Data);
150
151
XrdOss
*
SS
;
152
XrdOucStream
*
CMSp
;
153
XrdSysMutex
myData
;
154
int
myPort
;
155
char
*
CMSPath
;
156
char
*
Login
;
157
int
isRedir
;
158
int
isProxy
;
159
int
Active
;
160
};
161
#endif
Generated by
1.8.3.1