xrootd
Loading...
Searching...
No Matches
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/* 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
34#include "XrdCms/XrdCmsTypes.hh"
35
36class XrdLink;
37
39{
40public:
41
44
45void Enable();
46
47void *Monitor();
48
49int Port();
50
51void sendState(XrdLink *Link);
52
53void Set(int ncount);
54void Set(int ncount, int isman, const char *AdminPath);
55
57
58void Update(StateType StateT, int ActivVal, int StageVal=0);
59
62
63static const char SRV_Suspend = 1;
64static const char FES_Suspend = 2;
65static const char All_Suspend = 3;
66static const char All_NoStage = 4;
67
68private:
69unsigned char Status(int Changes, int theState);
70
73
74const char *NoStageFile;
75const char *SuspendFile;
76
77int minNodeCnt; // Minimum number of needed subscribers
78int numActive; // Number of active subscribers
79int numStaging; // Number of subscribers that can stage
80int dataPort; // Current data port number
81
82char currState; // Current state
83char prevState; // Previous state
84char feOK; // Front end functioning
85char noSpace; // We don't have enough space
86char adminSuspend; // Admin asked for suspension
87char adminNoStage; // Admin asked for no staging
88char isMan; // We are a manager (i.e., have redirectors)
89char Enabled; // We are now enabled for reporting
90};
91
92namespace XrdCms
93{
95}
96#endif
Definition XrdCmsState.hh:39
int Suspended
Definition XrdCmsState.hh:42
char currState
Definition XrdCmsState.hh:82
char feOK
Definition XrdCmsState.hh:84
~XrdCmsState()
Definition XrdCmsState.hh:61
char prevState
Definition XrdCmsState.hh:83
static const char FES_Suspend
Definition XrdCmsState.hh:64
XrdSysMutex myMutex
Definition XrdCmsState.hh:72
static const char All_NoStage
Definition XrdCmsState.hh:66
int numStaging
Definition XrdCmsState.hh:79
int minNodeCnt
Definition XrdCmsState.hh:77
void * Monitor()
char noSpace
Definition XrdCmsState.hh:85
void Update(StateType StateT, int ActivVal, int StageVal=0)
static const char All_Suspend
Definition XrdCmsState.hh:65
void Set(int ncount, int isman, const char *AdminPath)
static const char SRV_Suspend
Definition XrdCmsState.hh:63
int dataPort
Definition XrdCmsState.hh:80
char adminNoStage
Definition XrdCmsState.hh:87
int numActive
Definition XrdCmsState.hh:78
int NoStaging
Definition XrdCmsState.hh:43
void Set(int ncount)
void Enable()
const char * NoStageFile
Definition XrdCmsState.hh:74
const char * SuspendFile
Definition XrdCmsState.hh:75
StateType
Definition XrdCmsState.hh:56
@ FrontEnd
Definition XrdCmsState.hh:56
@ Active
Definition XrdCmsState.hh:56
@ Stage
Definition XrdCmsState.hh:56
@ Counts
Definition XrdCmsState.hh:56
@ Space
Definition XrdCmsState.hh:56
XrdSysSemaphore mySemaphore
Definition XrdCmsState.hh:71
char isMan
Definition XrdCmsState.hh:88
char adminSuspend
Definition XrdCmsState.hh:86
unsigned char Status(int Changes, int theState)
char Enabled
Definition XrdCmsState.hh:89
void sendState(XrdLink *Link)
Definition XrdSysPthread.hh:165
Definition XrdSysPthread.hh:494
Definition YProtocol.hh:78
XrdCmsState CmsState