xrootd
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
XrdSsiCms Class Reference

#include <XrdSsiCms.hh>

Inheritance diagram for XrdSsiCms:
Inheritance graph
[legend]
Collaboration diagram for XrdSsiCms:
Collaboration graph
[legend]

Public Member Functions

void Added (const char *name, bool pend=false)
 
bool DataContext ()
 
const char *const * Managers (int &mNum)
 
void Removed (const char *name)
 
void Resume (bool perm=true)
 
void Suspend (bool perm=true)
 
int Resource (int n)
 
int Reserve (int n=1)
 
int Release (int n=1)
 
void Utilization (unsigned int util, bool alert=false)
 
 XrdSsiCms ()
 
 XrdSsiCms (XrdCmsClient *cmsP)
 
virtual ~XrdSsiCms ()
 
- Public Member Functions inherited from XrdSsiCluster
 XrdSsiCluster ()
 Destructor.
 
virtual ~XrdSsiCluster ()
 

Private Attributes

XrdCmsClienttheCms
 
char ** manList
 
int manNum
 

Constructor & Destructor Documentation

◆ XrdSsiCms() [1/2]

XrdSsiCms::XrdSsiCms ( )
inline

◆ XrdSsiCms() [2/2]

XrdSsiCms::XrdSsiCms ( XrdCmsClient cmsP)

◆ ~XrdSsiCms()

virtual XrdSsiCms::~XrdSsiCms ( )
virtual

Member Function Documentation

◆ Added()

void XrdSsiCms::Added ( const char *  name,
bool  pend = false 
)
virtual

Notify the cluster of a newly added endpoint name or whose state has changed on on this server node.

Parameters
nameThe logical name.
pendWhen true, the name is scheduled to be present in the future.

Implements XrdSsiCluster.

◆ DataContext()

bool XrdSsiCms::DataContext ( )
inlinevirtual

Determine whether or not the SSI plug-in is running in a data context.

Returns
true running in a data context (i.e. xrootd).
false running is a meta context (i.e. cmsd).

Implements XrdSsiCluster.

◆ Managers()

const char *const * XrdSsiCms::Managers ( int &  mNum)
inlinevirtual

Obtain the list of nodes that are managing this cluster.

Parameters
mNumPlace to put the number of managers in the returned array.
Returns
The vector of nodes being used with mNum set to the number of elements. The list is considered permanent and is not deleted.

Implements XrdSsiCluster.

References manList, and manNum.

◆ Release()

int XrdSsiCms::Release ( int  n = 1)
inlinevirtual

Increase the amount of resource available. When transitioning from a a non-positive to a positive resource amount, perform a resume so that additional clients may be dispatched to this server.

Parameters
nThe value to add to the resources available (default 1). The total amount is capped by the amount specified by Resource().
Returns
The amount of resource left.

Implements XrdSsiCluster.

References XrdCmsClient::Release(), and theCms.

◆ Removed()

void XrdSsiCms::Removed ( const char *  name)
virtual

Notify the cluster that a name is no longer available on this server node.

Parameters
nameThe logical name that is no longer available.

Implements XrdSsiCluster.

◆ Reserve()

int XrdSsiCms::Reserve ( int  n = 1)
inlinevirtual

Decrease the amount of resources available. When the available resources becomes non-positive, perform a temporary suspend to prevent additional clients from being dispatched to this server.

Parameters
nThe value by which resources are decreased (default 1).
Returns
The amount of resource left.

Implements XrdSsiCluster.

References XrdCmsClient::Reserve(), and theCms.

◆ Resource()

int XrdSsiCms::Resource ( int  n)
inlinevirtual

Enable the Reserve() & Release() methods.

Parameters
na positive integer that specifies the amount of resource units that are available. It may be reset at any time.
Returns
The previous resource value. This first call returns 0.

Implements XrdSsiCluster.

References XrdCmsClient::Resource(), and theCms.

◆ Resume()

void XrdSsiCms::Resume ( bool  perm = true)
inlinevirtual

Resume service after a suspension.

Parameters
permWhen true the resume persist across server restarts. Otherwise, it is treated as a temporary request.

Implements XrdSsiCluster.

References XrdCmsClient::Resume(), and theCms.

◆ Suspend()

void XrdSsiCms::Suspend ( bool  perm = true)
inlinevirtual

Suspend service.

Parameters
permWhen true the suspend persist across server restarts. Otherwise, it is treated as a temporary request.

Implements XrdSsiCluster.

References XrdCmsClient::Suspend(), and theCms.

◆ Utilization()

void XrdSsiCms::Utilization ( unsigned int  util,
bool  alert = false 
)
inlinevirtual

Report utilization of this server. This may be used in lieu of general performance metric reporting. For consistent results use only one method.

Parameters
utilA value from 0 to 100 representing utilization. Values greater than 100 are set to be 100.
alertWhen true the utilization is forcibly report to the cluster managers. Otherwise, reporting is done only when it will significantly change server selection.

Implements XrdSsiCluster.

References theCms, and XrdCmsClient::Utilization().

Member Data Documentation

◆ manList

char** XrdSsiCms::manList
private

Referenced by Managers().

◆ manNum

int XrdSsiCms::manNum
private

Referenced by Managers().

◆ theCms

XrdCmsClient* XrdSsiCms::theCms
private

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