#include <XrdSsiCluster.hh>
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.
◆ XrdSsiCluster()
XrdSsiCluster::XrdSsiCluster |
( |
| ) |
|
|
inline |
◆ ~XrdSsiCluster()
virtual XrdSsiCluster::~XrdSsiCluster |
( |
| ) |
|
|
inlinevirtual |
◆ 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
-
name | The logical name. |
pend | When 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
-
mNum | Place 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
-
n | The 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
-
name | The 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
-
n | The 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
-
n | a 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
-
perm | When 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
-
perm | When 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
-
util | A value from 0 to 100 representing utilization. Values greater than 100 are set to be 100. |
alert | When 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: