xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdCms
XrdCmsState.hh
Go to the documentation of this file.
1
#ifndef __XRDCMSSTATE_H_
2
#define __XRDCMSSTATE_H_
3
/******************************************************************************/
4
/* */
5
/* X r d C m s S t a t e . 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
// $Id$
14
15
#include "
XrdSys/XrdSysPthread.hh
"
16
#include "
XrdCms/XrdCmsTypes.hh
"
17
18
class
XrdLink
;
19
20
class
XrdCmsState
21
{
22
public
:
23
24
int
Suspended
;
25
int
NoStaging
;
26
27
void
Enable
();
28
29
void
*
Monitor
();
30
31
int
Port
();
32
33
void
sendState
(
XrdLink
*Link);
34
35
void
Set
(
int
ncount);
36
void
Set
(
int
ncount,
int
isman,
const
char
*AdminPath);
37
38
enum
StateType
{
Active
= 0,
Counts
,
FrontEnd
,
Space
,
Stage
};
39
40
void
Update
(
StateType
StateT,
int
ActivVal,
int
StageVal=0);
41
42
XrdCmsState
();
43
~XrdCmsState
() {}
44
45
static
const
char
SRV_Suspend
= 1;
46
static
const
char
FES_Suspend
= 2;
47
static
const
char
All_Suspend
= 3;
48
static
const
char
All_NoStage
= 4;
49
50
private
:
51
unsigned
char
Status
(
int
Changes,
int
theState);
52
53
XrdSysSemaphore
mySemaphore
;
54
XrdSysMutex
myMutex
;
55
56
const
char
*
NoStageFile
;
57
const
char
*
SuspendFile
;
58
59
int
minNodeCnt
;
// Minimum number of needed subscribers
60
int
numActive
;
// Number of active subscribers
61
int
numStaging
;
// Number of subscribers that can stage
62
int
dataPort
;
// Current data port number
63
64
char
currState
;
// Current state
65
char
prevState
;
// Previous state
66
char
feOK
;
// Front end functioning
67
char
noSpace
;
// We don't have enough space
68
char
adminSuspend
;
// Admin asked for suspension
69
char
adminNoStage
;
// Admin asked for no staging
70
char
isMan
;
// We are a manager (i.e., have redirectors)
71
char
Enabled
;
// We are now enabled for reporting
72
};
73
74
namespace
XrdCms
75
{
76
extern
XrdCmsState
CmsState
;
77
}
78
#endif
Generated by
1.8.1.2