xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdCms
XrdCmsManList.hh
Go to the documentation of this file.
1
#ifndef __CMS_MANLIST__H
2
#define __CMS_MANLIST__H
3
/******************************************************************************/
4
/* */
5
/* X r d C m s M a n L i s t . 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
#include "
XrdSys/XrdSysPthread.hh
"
14
15
// $Id$
16
17
class
XrdCmsManRef
;
18
19
class
XrdCmsManList
20
{
21
public
:
22
23
// Add() adds an alternate manager to the list of managers (duplicates not added)
24
//
25
void
Add
(
unsigned
int
refp,
char
*manp,
int
manport,
int
lvl);
26
27
// Del() removes all entries added under refp
28
//
29
void
Del
(
unsigned
int
refp);
30
31
// haveAlts() returns true if alternates exist, false otherwise
32
//
33
int
haveAlts
() {
return
allMans
!= 0;}
34
35
// Next() returns the next manager in the list and its level or 0 if none are left.
36
// The next call to Next() will return the first manager in the list.
37
//
38
int
Next
(
int
&
port
,
char
*buff,
int
bsz);
39
40
XrdCmsManList
() {
allMans
=
nextMan
= 0;}
41
~XrdCmsManList
();
42
43
private
:
44
45
XrdSysMutex
mlMutex
;
46
XrdCmsManRef
*
nextMan
;
47
XrdCmsManRef
*
allMans
;
48
};
49
50
namespace
XrdCms
51
{
52
extern
XrdCmsManList
myMans
;
53
}
54
#endif
Generated by
1.8.1.2