XRootD
XrdCmsRole Class Reference

#include <XrdCmsRole.hh>

+ Collaboration diagram for XrdCmsRole:

Public Types

enum  RoleID {
  MetaManager = 0 ,
  Manager ,
  Supervisor ,
  Server ,
  ProxyManager ,
  ProxySuper ,
  ProxyServer ,
  PeerManager ,
  Peer ,
  noRole
}
 

Public Member Functions

 XrdCmsRole ()
 
 ~XrdCmsRole ()
 

Static Public Member Functions

static RoleID Convert (const char *Tok1, const char *Tok2)
 
static const char * Name (RoleID rid)
 
static const char * Type (const char *rtype)
 
static const char * Type (RoleID rid)
 

Detailed Description

Definition at line 37 of file XrdCmsRole.hh.

Member Enumeration Documentation

◆ RoleID

Enumerator
MetaManager 
Manager 
Supervisor 
Server 
ProxyManager 
ProxySuper 
ProxyServer 
PeerManager 
Peer 
noRole 

Definition at line 41 of file XrdCmsRole.hh.

Constructor & Destructor Documentation

◆ XrdCmsRole()

XrdCmsRole::XrdCmsRole ( )
inline

Definition at line 102 of file XrdCmsRole.hh.

102 {}

◆ ~XrdCmsRole()

XrdCmsRole::~XrdCmsRole ( )
inline

Definition at line 103 of file XrdCmsRole.hh.

103 {}

Member Function Documentation

◆ Convert()

static RoleID XrdCmsRole::Convert ( const char *  Tok1,
const char *  Tok2 
)
inlinestatic

Definition at line 47 of file XrdCmsRole.hh.

48  {if (!Tok2)
49  {if (!strcmp( Tok1, "server")) return Server;
50  if (!strcmp( Tok1, "supervisor")) return Supervisor;
51  return (strcmp(Tok1, "manager") ? noRole:Manager);
52  }
53  if (!strcmp( Tok1, "proxy"))
54  {if (!strcmp( Tok2, "server")) return ProxyServer;
55  if (!strcmp( Tok2, "supervisor")) return ProxySuper;
56  return (strcmp(Tok2, "manager") ? noRole:ProxyManager);
57  }
58  if (!strcmp( Tok1, "meta"))
59  return (strcmp(Tok2, "manager") ? noRole:MetaManager);
60  return noRole;
61  }

References Manager, MetaManager, noRole, ProxyManager, ProxyServer, ProxySuper, Server, and Supervisor.

◆ Name()

static const char* XrdCmsRole::Name ( RoleID  rid)
inlinestatic

Definition at line 63 of file XrdCmsRole.hh.

64  {static const char *rName[] = {"meta manager", // MetaMan
65  "manager", // Manager
66  "supervisor", // Super
67  "server", // Server
68  "proxy manager", // ProxyMan
69  "proxy supervisor",
70  "proxy server", // ProxyServ
71  "peer manager", // PeerMan
72  "peer" // Peer
73  };
74  if (rid >= MetaManager && rid < noRole) return rName[rid];
75  return "??";
76  }

References MetaManager, and noRole.

Referenced by XrdCmsConfig::Configure1().

+ Here is the caller graph for this function:

◆ Type() [1/2]

static const char* XrdCmsRole::Type ( const char *  rtype)
inlinestatic

Definition at line 93 of file XrdCmsRole.hh.

94  {if (*rtype == 'M') return "manager";
95  if (*rtype == 'R') return "supervisor";
96  if (*rtype == 'S') return "server";
97  if (*rtype == 'P') return "proxy";
98  if (*rtype == 'E') return "peer";
99  return "";
100  }

◆ Type() [2/2]

static const char* XrdCmsRole::Type ( RoleID  rid)
inlinestatic

Definition at line 78 of file XrdCmsRole.hh.

79  {static const char *tName[] = {"MM", // MetaMan
80  "M", // Manager
81  "R", // Super
82  "S", // Server
83  "PM", // ProxyMan
84  "PR", // ProxySuper
85  "PS", // ProxyServ
86  "EM", // PeerMan
87  "E" // Peer
88  };
89  if (rid >= MetaManager && rid < noRole) return tName[rid];
90  return "??";
91  }

References MetaManager, and noRole.

Referenced by XrdCmsConfig::Configure1(), and XrdCmsCluster::Statt().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: