xrootd
Loading...
Searching...
No Matches
XrdCmsRTable.hh
Go to the documentation of this file.
1#ifndef __XRDCMSRTABLE_HH_
2#define __XRDCMSRTABLE_HH_
3/******************************************************************************/
4/* */
5/* X r d C m s R T a b l 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
33#include <cstring>
34
35#include "XrdCms/XrdCmsNode.hh"
36#include "XrdCms/XrdCmsTypes.hh"
38
40{
41public:
42
43short Add(XrdCmsNode *nP);
44
45void Del(XrdCmsNode *nP);
46
47XrdCmsNode *Find(short Num, int Inst);
48
49void Send(const char *What, const char *data, int dlen);
50
51void Lock() {myMutex.Lock();}
52
54
55 XrdCmsRTable() {memset(Rtable, 0, sizeof(Rtable)); Hwm = -1;}
56
58
59private:
60
63int Hwm;
64};
65
66namespace XrdCms
67{
68extern XrdCmsRTable RTable;
69}
70#endif
#define maxRD
Definition XrdCmsTypes.hh:44
Definition XrdCmsNode.hh:58
Definition XrdCmsRTable.hh:40
void Lock()
Definition XrdCmsRTable.hh:51
XrdCmsNode * Rtable[maxRD]
Definition XrdCmsRTable.hh:62
~XrdCmsRTable()
Definition XrdCmsRTable.hh:57
XrdCmsRTable()
Definition XrdCmsRTable.hh:55
short Add(XrdCmsNode *nP)
void Del(XrdCmsNode *nP)
XrdCmsNode * Find(short Num, int Inst)
void UnLock()
Definition XrdCmsRTable.hh:53
void Send(const char *What, const char *data, int dlen)
int Hwm
Definition XrdCmsRTable.hh:63
XrdSysMutex myMutex
Definition XrdCmsRTable.hh:61
Definition XrdSysPthread.hh:165
void Lock()
Definition XrdSysPthread.hh:222
void UnLock()
Definition XrdSysPthread.hh:224
Definition YProtocol.hh:78
XrdCmsRTable RTable