com::pcbsys::nirvana::nAdminAPI::nClusterStatus Class Reference

This class contains the status of the of a realm within the cluster, What state it has, which node is the elected master etc. More...

#include <nClusterStatus.h>

Inherits Observable.

Public Member Functions

virtual bool canBeMaster ()
 Indicates whether the cluster member can be selected as master within the cluster. More...
 
virtual const std::string & getElectedMaster ()
 The name of the nodes elected master. More...
 
virtual const std::string & getName ()
 The name of the realm which these status's are related to. More...
 
virtual std::string getState ()
 Returns the realms cluster state. More...
 
virtual nClusterStatusEntrygetStatus (int idx)
 Returns nClusterStatusEntry for the realm at the index specified. More...
 
virtual nClusterStatusEntrygetStatus (const std::string &realm)
 Returns nClusterStatusEntry for the specified realm. More...
 
 nClusterStatus (const std::string &name)
 Creates a new nClusterStatus Object for the specified realm. More...
 
virtual int size ()
 The number of known nodes within the cluster. More...
 

Detailed Description

This class contains the status of the of a realm within the cluster, What state it has, which node is the elected master etc.

Constructor & Destructor Documentation

com::pcbsys::nirvana::nAdminAPI::nClusterStatus::nClusterStatus ( const std::string &  name)

Creates a new nClusterStatus Object for the specified realm.

Parameters
namethe string name of the cluster

Member Function Documentation

virtual bool com::pcbsys::nirvana::nAdminAPI::nClusterStatus::canBeMaster ( )
virtual

Indicates whether the cluster member can be selected as master within the cluster.

Returns
whether the member can be elected master
virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nClusterStatus::getElectedMaster ( )
virtual

The name of the nodes elected master.

Returns
the elected master's name as a string
virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nClusterStatus::getName ( )
virtual

The name of the realm which these status's are related to.

Returns
the name of the realm.
virtual std::string com::pcbsys::nirvana::nAdminAPI::nClusterStatus::getState ( )
virtual

Returns the realms cluster state.

Returns
String representing the current state of this node within the cluster.
virtual nClusterStatusEntry* com::pcbsys::nirvana::nAdminAPI::nClusterStatus::getStatus ( int  idx)
virtual

Returns nClusterStatusEntry for the realm at the index specified.

Parameters
idxto get the status for.
Returns
status object at the requested index.
virtual nClusterStatusEntry* com::pcbsys::nirvana::nAdminAPI::nClusterStatus::getStatus ( const std::string &  realm)
virtual

Returns nClusterStatusEntry for the specified realm.

Parameters
realmname to get status for.
Returns
status for specified realm.
virtual int com::pcbsys::nirvana::nAdminAPI::nClusterStatus::size ( )
virtual

The number of known nodes within the cluster.

Returns
number of nodes within the cluster.