xrootd
Loading...
Searching...
No Matches
Public Member Functions | List of all members
XrdSsiCluster Class Referenceabstract

#include <XrdSsiCluster.hh>

Inheritance diagram for XrdSsiCluster:
Inheritance graph
[legend]

Public Member Functions

virtual void Added (const char *name, bool pend=false)=0
 
virtual bool DataContext ()=0
 
virtual const char *const * Managers (int &mNum)=0
 
virtual void Removed (const char *name)=0
 
virtual void Resume (bool perm=true)=0
 
virtual void Suspend (bool perm=true)=0
 
virtual int Resource (int n)=0
 
virtual int Reserve (int n=1)=0
 
virtual int Release (int n=1)=0
 
virtual void Utilization (unsigned int util, bool alert=false)=0
 
 XrdSsiCluster ()
 Destructor.
 
virtual ~XrdSsiCluster ()
 

Detailed Description

The XrdSsiCluster object provides methods to manage the names and resources of a server node relative to the cluster in which it resides. A pointer to object is passed to the XrdSsiServer object loaded as start-up. It remains valid for the duration of the program.

Constructor & Destructor Documentation

◆ XrdSsiCluster()

XrdSsiCluster::XrdSsiCluster ( )
inline

Destructor.

◆ ~XrdSsiCluster()

virtual XrdSsiCluster::~XrdSsiCluster ( )
inlinevirtual

Member Function Documentation

◆ Added()

virtual void XrdSsiCluster::Added ( const char *  name,
bool  pend = false 
)
pure 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.

Implemented in XrdSsiCms.

◆ DataContext()

virtual bool XrdSsiCluster::DataContext ( )
pure virtual

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).

Implemented in XrdSsiCms.

◆ Managers()

virtual const char *const * XrdSsiCluster::Managers ( int &  mNum)
pure virtual

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.

Implemented in XrdSsiCms.

◆ Release()

virtual int XrdSsiCluster::Release ( int  n = 1)
pure virtual

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.

Implemented in XrdSsiCms.

◆ Removed()

virtual void XrdSsiCluster::Removed ( const char *  name)
pure virtual

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

Parameters
nameThe logical name that is no longer available.

Implemented in XrdSsiCms.

◆ Reserve()

virtual int XrdSsiCluster::Reserve ( int  n = 1)
pure virtual

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.

Implemented in XrdSsiCms.

◆ Resource()

virtual int XrdSsiCluster::Resource ( int  n)
pure virtual

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.

Implemented in XrdSsiCms.

◆ Resume()

virtual void XrdSsiCluster::Resume ( bool  perm = true)
pure virtual

Resume service after a suspension.

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

Implemented in XrdSsiCms.

◆ Suspend()

virtual void XrdSsiCluster::Suspend ( bool  perm = true)
pure virtual

Suspend service.

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

Implemented in XrdSsiCms.

◆ Utilization()

virtual void XrdSsiCluster::Utilization ( unsigned int  util,
bool  alert = false 
)
pure virtual

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.

Implemented in XrdSsiCms.


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