Loading...
Searching...
No Matches
XrdCmsSupervisor Class Reference

`#include <XrdCmsSupervisor.hh>`

Collaboration diagram for XrdCmsSupervisor:

## Public Member Functions

| XrdCmsSupervisor ()
| ~XrdCmsSupervisor ()

## Static Public Member Functions

static int | Init (const char *AdminPath, int AdminMode)
static void | Start ()

## Static Public Attributes

static int | superOK = 0

## Detailed Description

Definition at line 36 of file XrdCmsSupervisor.hh.

## Constructor & Destructor Documentation

## XrdCmsSupervisor()

XrdCmsSupervisor::XrdCmsSupervisor | ( |  | ) |

inline

Definition at line 46 of file XrdCmsSupervisor.hh.

{}

## ~XrdCmsSupervisor()

XrdCmsSupervisor::~XrdCmsSupervisor | ( |  | ) |

inline

Definition at line 47 of file XrdCmsSupervisor.hh.

{}

## Member Function Documentation

## Init()

int XrdCmsSupervisor::Init | ( | const char * | AdminPath,
|  | int | AdminMode )

static

Definition at line 58 of file XrdCmsSupervisor.cc.

{
char spbuff[1024];
// Create the supervisor unix domain socket. We use this for the redirector
// assigned to this supervisor node (one one redirector allowed)
//
if (!XrdNetSocket::socketPath(&Say, spbuff, AdminPath,
"olbd.super", AdminMode | S_IFSOCK)) return 1;
// Create a new network suitable for use with XrdLink objects
//
if (!(NetTCPr = new XrdInet(&Say)))
{Say.Emsg("Supervisor","Unable to create supervisor interface.");
return 0;
}
// Set out domain name for this network
//
if (Config.myDomain) NetTCPr->setDomain(Config.myDomain);
// Bind the unix domain path to the network
//
if (NetTCPr->Bind(spbuff, "tcp")) return 0;
// We need to force the minimum number of subscribers to be one and never a
// percentage, regardless of what was specified in the config file. This is
// because supervisors may loose their subscribers in unusual ways. We also
// set the drop delay to zero to immediately drop servers from the config to
// avoid stalling clients at a supervisor node.
//
Config.SUPCount = 1;
Config.SUPLevel = 0;
Config.DRPDelay = 0;
// All done
//
superOK = 1;
return 1;
}
XrdCmsConfig::SUPLevel
int SUPLevel
Definition XrdCmsConfig.hh:83
XrdCmsConfig::myDomain
const char * myDomain
Definition XrdCmsConfig.hh:173
XrdCmsConfig::DRPDelay
int DRPDelay
Definition XrdCmsConfig.hh:76
XrdCmsConfig::SUPCount
int SUPCount
Definition XrdCmsConfig.hh:82
XrdCmsSupervisor::superOK
static int superOK
Definition XrdCmsSupervisor.hh:40
XrdNetSocket::socketPath
static char * socketPath(XrdSysError *Say, char *inbuff, const char *path, const char *fn, mode_t mode)
Definition XrdNetSocket.cc:492
XrdSysError::Emsg
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)
Definition XrdSysError.cc:95
XrdCms::Say
XrdSysError Say
Definition XrdCmsManager.cc:62
XrdCms::Config
XrdCmsConfig Config
Definition XrdCmsConfig.cc:108

References XrdCms::Config, XrdCms::Say, XrdNet::setDomain(), XrdNetSocket::socketPath(), and superOK.

Here is the call graph for this function:

## Start()

void XrdCmsSupervisor::Start | ( |  | ) |

static

Definition at line 103 of file XrdCmsSupervisor.cc.

{
XrdCmsProtocol *pP;
XrdLink *lP;
// Accept single connections and dispatch the supervisor data interface
//
while(1)
if ((lP = NetTCPr->Accept(XRDNET_NODNTRIM)))
{if ((pP = XrdCmsProtocol::Alloc("redirector")))
{lP->setProtocol((XrdProtocol *)pP);
pP->Process(lP);
lP->Close();
}
}
}
XRDNET_NODNTRIM
#define XRDNET_NODNTRIM
Definition XrdNetOpts.hh:51
XrdCmsProtocol::Alloc
static XrdCmsProtocol * Alloc(const char *theRole="", XrdCmsManager *mP=0, const char *theMan=0, int thePort=0)
Definition XrdCmsProtocol.cc:892
XrdLink::setProtocol
XrdProtocol * setProtocol(XrdProtocol *pp, bool runit=false, bool push=false)
Definition XrdLink.cc:426
XrdLink::Close
int Close(bool defer=false)
Definition XrdLink.cc:167
XrdProtocol::Process
virtual int Process(XrdLink *lp)=0

References XrdCmsProtocol::Alloc(), XrdLink::Close(), XrdProtocol::Process(), XrdLink::setProtocol(), and XRDNET_NODNTRIM.

Referenced by XrdCmsStartSupervising().

Here is the call graph for this function:
Here is the caller graph for this function:

## Member Data Documentation

## superOK

int XrdCmsSupervisor::superOK = 0

static

Definition at line 40 of file XrdCmsSupervisor.hh.

Referenced by XrdCmsConfig::DoIt(), and Init().

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

- XrdCmsSupervisor.hh
- XrdCmsSupervisor.cc