xrootd
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 
13 // $Id$
14 
15 #include <string.h>
16 
17 #include "XrdCms/XrdCmsNode.hh"
18 #include "XrdCms/XrdCmsTypes.hh"
19 #include "XrdSys/XrdSysPthread.hh"
20 
22 {
23 public:
24 
25 short Add(XrdCmsNode *nP);
26 
27 void Del(XrdCmsNode *nP);
28 
29 XrdCmsNode *Find(short Num, int Inst);
30 
31 void Send(const char *What, const char *data, int dlen);
32 
33 void Lock() {myMutex.Lock();}
34 
35 void UnLock() {myMutex.UnLock();}
36 
37  XrdCmsRTable() {memset(Rtable, 0, sizeof(Rtable)); Hwm = -1;}
38 
40 
41 private:
42 
45 int Hwm;
46 };
47 
48 namespace XrdCms
49 {
50 extern XrdCmsRTable RTable;
51 }
52 #endif