#include <XrdSsiCluster.hh>
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 () |
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 | ( | ) | [inline] |
Destructor.
virtual XrdSsiCluster::~XrdSsiCluster | ( | ) | [inline, virtual] |
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.
name | The logical name. | |
pend | When true, the name is scheduled to be present in the future. |
Implemented in XrdSsiCms.
virtual bool XrdSsiCluster::DataContext | ( | ) | [pure virtual] |
Determine whether or not the SSI plug-in is running in a data context.
Implemented in XrdSsiCms.
virtual const char* const* XrdSsiCluster::Managers | ( | int & | mNum | ) | [pure virtual] |
Obtain the list of nodes that are managing this cluster.
mNum | Place to put the number of managers in the returned array. |
Implemented in XrdSsiCms.
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.
n | The value to add to the resources available (default 1). The total amount is capped by the amount specified by Resource(). |
Implemented in XrdSsiCms.
virtual void XrdSsiCluster::Removed | ( | const char * | name | ) | [pure virtual] |
Notify the cluster that a name is no longer available on this server node.
name | The logical name that is no longer available. |
Implemented in XrdSsiCms.
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.
n | The value by which resources are decreased (default 1). |
Implemented in XrdSsiCms.
virtual int XrdSsiCluster::Resource | ( | int | n | ) | [pure virtual] |
virtual void XrdSsiCluster::Resume | ( | bool | perm = true |
) | [pure virtual] |
Resume service after a suspension.
perm | When true the resume persist across server restarts. Otherwise, it is treated as a temporary request. |
Implemented in XrdSsiCms.
virtual void XrdSsiCluster::Suspend | ( | bool | perm = true |
) | [pure virtual] |
Suspend service.
perm | When true the suspend persist across server restarts. Otherwise, it is treated as a temporary request. |
Implemented in XrdSsiCms.
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.
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.