com.pcbsys.nirvana.nAdminAPI.nClusterSite Class Reference

This class defines a collection of realms within a cluster into a physical site / location. More...

Inherits SortedObject.

Public Member Functions

void addMember (String name) throws Exception
 Add a realm to this site. More...
 
void delMember (String realmName) throws Exception
 Remove a realm as a member of a site. More...
 
boolean equals (long aLong)
 Compares this object with the passed object. More...
 
String findNode (String name)
 Find a specific member realm in this site. More...
 
Iterator getIterator ()
 Returns an iterator of known site member realms. More...
 
String getName ()
 Get the name of the defined cluster site. More...
 
Enumeration getNodes ()
 Return the members defined in this site. More...
 
int getNoOfMembers ()
 Return the number of members defined in this site. More...
 
boolean isMatch (Object item)
 Compares this object with the passed object. More...
 
boolean isMember (String name)
 Check if a realm is a member of this site. More...
 
boolean isPrime ()
 Returns if the defined site is regarded as prime. More...
 
boolean lessThan (long aLong)
 Compares this object with the passed object. More...
 
boolean lessThan (Object item)
 Compares this object with the passed object. More...
 
void setPrime (boolean flag) throws Exception
 Sets whether this site is defined as prime. More...
 

Detailed Description

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

Member Function Documentation

void com.pcbsys.nirvana.nAdminAPI.nClusterSite.addMember ( String  name) throws Exception

Add a realm to this site.

Parameters
namename of the realm to be added
Exceptions
Exceptionif the operation could not be completed
void com.pcbsys.nirvana.nAdminAPI.nClusterSite.delMember ( String  realmName) throws Exception

Remove a realm as a member of a site.

Parameters
realmNamethe realm to delete from the site
Exceptions
Exceptionif the operation could not be completed
boolean com.pcbsys.nirvana.nAdminAPI.nClusterSite.equals ( long  aLong)

Compares this object with the passed object.

For internal use only

Parameters
aLonglong to compare against
Returns
True if this object is equal to the passed long
String com.pcbsys.nirvana.nAdminAPI.nClusterSite.findNode ( String  name)

Find a specific member realm in this site.

Parameters
namename of the realm you wish to find in the members
Returns
the name of the realm or null if not found
Iterator com.pcbsys.nirvana.nAdminAPI.nClusterSite.getIterator ( )

Returns an iterator of known site member realms.

Returns
iterator of site member realms
String com.pcbsys.nirvana.nAdminAPI.nClusterSite.getName ( )

Get the name of the defined cluster site.

Returns
the cluster site name
Enumeration com.pcbsys.nirvana.nAdminAPI.nClusterSite.getNodes ( )

Return the members defined in this site.

Returns
The site members
Deprecated:
Please use getIterator
int com.pcbsys.nirvana.nAdminAPI.nClusterSite.getNoOfMembers ( )

Return the number of members defined in this site.

Returns
The number of site members
boolean com.pcbsys.nirvana.nAdminAPI.nClusterSite.isMatch ( Object  item)

Compares this object with the passed object.

For internal use only

Parameters
itemObject to compare against
Returns
True if this object is equal to the passed object
boolean com.pcbsys.nirvana.nAdminAPI.nClusterSite.isMember ( String  name)

Check if a realm is a member of this site.

Parameters
nameof the realm to check
Returns
true / false whether the realm is a member
boolean com.pcbsys.nirvana.nAdminAPI.nClusterSite.isPrime ( )

Returns if the defined site is regarded as prime.

Returns
true if prime
boolean com.pcbsys.nirvana.nAdminAPI.nClusterSite.lessThan ( long  aLong)

Compares this object with the passed object.

For internal use only

Parameters
aLonglong to compare against
Returns
True if this object is less than the passed long
boolean com.pcbsys.nirvana.nAdminAPI.nClusterSite.lessThan ( Object  item)

Compares this object with the passed object.

For internal use only

Parameters
itemObject to compare against
Returns
True if this object is less than the passed object
void com.pcbsys.nirvana.nAdminAPI.nClusterSite.setPrime ( boolean  flag) throws Exception

Sets whether this site is defined as prime.

Parameters
flagwhether the site is prime
Exceptions
Exceptionif the operation could not be completed