xrootd
Loading...
Searching...
No Matches
XrdCmsManTree.hh
Go to the documentation of this file.
1#ifndef __XRDCMSMANTREE_HH_
2#define __XRDCMSMANTREE_HH_
3/******************************************************************************/
4/* */
5/* X r d C m s M a n T r e 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
35
36class XrdCmsNode;
37
39{
40public:
41
42void Abort();
43
44int Connect(int nID, XrdCmsNode *nP);
45
46void Disc(int nID);
47
49
50int Trying(int nID, int Lvl);
51
53
54 XrdCmsManTree(int maxC);
56
57private:
58
59void Redrive(int nID) {tmInfo[nID].Status = Active;
60 tmInfo[nID].theSem.Post();
61 numWaiting--;
62 }
63void Pause(int nID) {tmInfo[nID].Status = Waiting;
64 numWaiting++;
66 tmInfo[nID].theSem.Wait();
67 }
68
70
71
82
83char buff[16];
92};
93#endif
Definition XrdCmsManTree.hh:39
int numWaiting
Definition XrdCmsManTree.hh:90
connStat myStatus
Definition XrdCmsManTree.hh:91
int maxTMI
Definition XrdCmsManTree.hh:84
int conNID
Definition XrdCmsManTree.hh:89
void Pause(int nID)
Definition XrdCmsManTree.hh:63
XrdSysMutex myMutex
Definition XrdCmsManTree.hh:69
void Redrive(int nID)
Definition XrdCmsManTree.hh:59
int numConn
Definition XrdCmsManTree.hh:85
int Connect(int nID, XrdCmsNode *nP)
int atRoot
Definition XrdCmsManTree.hh:87
connStat
Definition XrdCmsManTree.hh:52
@ Active
Definition XrdCmsManTree.hh:52
@ Waiting
Definition XrdCmsManTree.hh:52
@ Pending
Definition XrdCmsManTree.hh:52
@ None
Definition XrdCmsManTree.hh:52
@ Aborted
Definition XrdCmsManTree.hh:52
@ Connected
Definition XrdCmsManTree.hh:52
void Disc(int nID)
XrdCmsManTree(int maxC)
~XrdCmsManTree()
Definition XrdCmsManTree.hh:55
struct XrdCmsManTree::TreeInfo tmInfo[XrdCmsManager::MTMax]
char buff[16]
Definition XrdCmsManTree.hh:83
int conLevel
Definition XrdCmsManTree.hh:88
int maxConn
Definition XrdCmsManTree.hh:86
int Trying(int nID, int Lvl)
static const int MTMax
Definition XrdCmsManager.hh:63
Definition XrdCmsNode.hh:58
Definition XrdSysPthread.hh:165
void UnLock()
Definition XrdSysPthread.hh:224
Definition XrdSysPthread.hh:494
void Wait()
Definition XrdSysPthread.hh:509
void Post()
Definition XrdSysPthread.hh:505
Definition XrdCmsManTree.hh:73
XrdCmsNode * nodeP
Definition XrdCmsManTree.hh:74
connStat Status
Definition XrdCmsManTree.hh:75
int Level
Definition XrdCmsManTree.hh:76
XrdSysSemaphore theSem
Definition XrdCmsManTree.hh:73
~TreeInfo()
Definition XrdCmsManTree.hh:79
TreeInfo()
Definition XrdCmsManTree.hh:78