This class defines a collection of realms within a cluster into a physical site / location.
More...
#include <nClusterSite.h>
Inherits CountableObject.
|
virtual void | addMember (const std::string &name) |
| Add a realm to this site. More...
|
|
virtual void | delMember (const std::string &realmName) |
| Remove a realm as a member of a site. More...
|
|
virtual std::string | findNode (const std::string &name) |
| Find a specific member realm in this site. More...
|
|
virtual std::list< std::string > & | getMembers () |
| Returns a list of known site member realm names. More...
|
|
virtual const std::string & | getName () |
| Get the name of the defined cluster site. More...
|
|
virtual int | getNoOfMembers () |
| Return the number of members defined in this site. More...
|
|
virtual bool | isMember (const std::string &name) |
| Check if a realm is a member of this site. More...
|
|
virtual bool | isPrime () |
| Returns if the defined site is regarded as prime. More...
|
|
| nClusterSite (const std::string &name, nClusterNode *pOwningCluster) |
| Creates a new site with a given name within the supplied owning cluster. More...
|
|
virtual void | setPrime (bool flag) |
| Sets whether this site is defined as prime. More...
|
|
This class defines a collection of realms within a cluster into a physical site / location.
A site can be given prime status, which means that in failover with 2 sites defined, the prime site will receive and additional vote enabling the remaining cluster realms to achieve quorum
com::pcbsys::nirvana::nAdminAPI::nClusterSite::nClusterSite |
( |
const std::string & |
name, |
|
|
nClusterNode * |
pOwningCluster |
|
) |
| |
Creates a new site with a given name within the supplied owning cluster.
- Parameters
-
name | name of the site |
*pOwningCluster | the nClusterNode of the owning cluster |
- Returns
- true / false whether the realm is a member
virtual void com::pcbsys::nirvana::nAdminAPI::nClusterSite::addMember |
( |
const std::string & |
name | ) |
|
|
virtual |
Add a realm to this site.
- Parameters
-
name | name of the realm to be added |
virtual void com::pcbsys::nirvana::nAdminAPI::nClusterSite::delMember |
( |
const std::string & |
realmName | ) |
|
|
virtual |
Remove a realm as a member of a site.
- Parameters
-
realmName | the realm name to delete from the site as a string |
- Exceptions
-
Exception | if the operation could not be completed |
virtual std::string com::pcbsys::nirvana::nAdminAPI::nClusterSite::findNode |
( |
const std::string & |
name | ) |
|
|
virtual |
Find a specific member realm in this site.
- Parameters
-
name | name string of the realm you wish to find in the members |
- Returns
- the name string of the realm or null if not found
virtual std::list<std::string>& com::pcbsys::nirvana::nAdminAPI::nClusterSite::getMembers |
( |
| ) |
|
|
virtual |
Returns a list of known site member realm names.
- Returns
- iterator of site member realm names
virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nClusterSite::getName |
( |
| ) |
|
|
virtual |
Get the name of the defined cluster site.
- Returns
- the cluster site name
virtual int com::pcbsys::nirvana::nAdminAPI::nClusterSite::getNoOfMembers |
( |
| ) |
|
|
virtual |
Return the number of members defined in this site.
- Returns
- The number of site members
virtual bool com::pcbsys::nirvana::nAdminAPI::nClusterSite::isMember |
( |
const std::string & |
name | ) |
|
|
virtual |
Check if a realm is a member of this site.
- Parameters
-
name | string of the realm to check |
- Returns
- true / false whether the realm is a member
virtual bool com::pcbsys::nirvana::nAdminAPI::nClusterSite::isPrime |
( |
| ) |
|
|
virtual |
Returns if the defined site is regarded as prime.
- Returns
- true if prime
virtual void com::pcbsys::nirvana::nAdminAPI::nClusterSite::setPrime |
( |
bool |
flag | ) |
|
|
virtual |
Sets whether this site is defined as prime.
- Parameters
-
flag | whether the site is prime |
- Exceptions
-
Exception | if the operation could not be completed |