com.pcbsys.nirvana.nAdminAPI.nClusterNode Class Reference

Contains the status and configuration of a Nirvana cluster. More...

Inheritance diagram for com.pcbsys.nirvana.nAdminAPI.nClusterNode:
com.pcbsys.nirvana.nAdminAPI.nContainer com.pcbsys.nirvana.nAdminAPI.nNode

Public Member Functions

void addConnectionListener (final nClusterConnectionListener listener) throws nBaseAdminException
 Adds a nClusterConnectionListener to the cluster to receive callbacks as connections are made or lost to any realms within the cluster. More...
 
void addConnectionListenerToAllLeafNodes (final nConnectionListener listener) throws nBaseAdminException
 Adds a nConnectionListener to each nLeaNode of each nRealmNode in the cluster. More...
 
void addConnectionListenerToAllServiceNodes (final nConnectionListener listener) throws nBaseAdminException
 Adds a nConnectionListener to each nServiceNode of each nRealmNode in the cluster. More...
 
void addListener (final nClusterEventListener listener)
 Adds a nClusterEventListener to the cluster to receive callbacks as the state of the cluster changes. More...
 
void addMember (final nClusterMemberConfiguration node) throws nSessionNotConnectedException, nRequestTimedOutException, nSecurityException, nBaseClientException, nDuplicateChannelNameException
 Adds a new node to an existing cluster. More...
 
boolean canBeMaster (final nRealmNode node) throws nBaseClientException
 Tests to see if the supplied node can be master of the cluster. More...
 
void close ()
 Closes connections to all realms for the specified Nirvana Realm server.
 
void closed (nRealmNode node)
 Called when the nRealmNode is closed, for internal use only. More...
 
nClusterSite createSite (String name, String initialRealm) throws Exception
 Method that allows you to create a site from a cluster node. More...
 
nClusterSite createSite (String name, final String initialRealm, boolean waitForSync) throws nRequestTimedOutException, Exception
 Method that allows you to create a site from a cluster node. More...
 
void delConnectionListener (final nClusterConnectionListener listener) throws nBaseAdminException
 Removes a nClusterConnectionListener from the cluster. More...
 
void deleteMember (nRealmNode node) throws nBaseClientException, nSessionNotConnectedException, nSecurityException
 Removes the specified realm from the cluster. More...
 
void deleteMember (nRealmNode node, boolean deleteStore) throws nBaseClientException, nSessionNotConnectedException, nSecurityException
 Removes the specified realm from the cluster. More...
 
void deleteSite (nClusterSite site) throws Exception
 Method that allows you to delete a site. More...
 
void delListener (final nClusterEventListener listener)
 Deregisters a nClusterEventListener from the cluster for callbacks. More...
 
void deregisterRemoteCluster (nClusterNode remoteCluster) throws Exception
 Removes the remote node given by the parameter remoteCluster from this cluster node. More...
 
void destroy () throws nBaseClientException, nSessionNotConnectedException, nSecurityException
 Deletes the cluster and removes all known realms from the cluster. More...
 
void destroy (boolean deleteStore) throws nBaseClientException, nSessionNotConnectedException, nSecurityException
 Deletes the cluster and removes all known realms from the cluster. More...
 
Vector< nClusterStatusgetClusterConnectionStatus ()
 Returns a Vector of nClusterStatus which contains the current cluster status. More...
 
Set< nClusterNodegetKnownRemoteClusters () throws nRealmUnreachableException
 Returns the set of clusters that this cluster has inter-cluster connections to. More...
 
nRealmNode getMaster ()
 Returns the current master of the cluster. More...
 
nRealmNode getMaster (long timeout) throws Exception
 Returns the current master of the cluster. More...
 
int getNoOfSites ()
 Returns the number of defined nClusterSite objects. More...
 
nClusterSite getSite (String site)
 Method to get the site, if any, that this cluster is part of. More...
 
Iterator getSites ()
 Returns an iterator of nClusterSite objects. More...
 
boolean hasMember (final nRealmNode node) throws nSecurityException, nBaseClientException
 Tests to see if the supplied node is part of the cluster. More...
 
boolean hasMember (final String realm) throws nBaseClientException
 Tests to see if the supplied realm name is part of the cluster. More...
 
boolean hasquorum ()
 Tests to see if the cluster has quorum and is functioning. More...
 
boolean hasSites ()
 Returns true if the cluster uses sites.
 
boolean isOnline ()
 Returns true if the cluster has quorum and has the master.
 
void joinRemoteClusterStore (nLeafNode source, nLeafNode destination, boolean isRouted, int hopCount, String selector, boolean allowPurge) throws Exception
 Joins the stores between two different clusters together. More...
 
void modifyMember (nClusterMemberConfiguration config) throws nBaseClientException, nDuplicateChannelNameException
 Modifies the specified realm in the cluster as far as the CanBeMaster flag. More...
 
void registerRemoteCluster (nClusterNode remoteCluster) throws Exception
 Adds the realm nodes in the remoteCluster node to this clusterNode, creating a logical connection between them. More...
 
- Public Member Functions inherited from com.pcbsys.nirvana.nAdminAPI.nContainer
void addACLEntries (nACL acl) throws nAdminIllegalArgumentException, nBaseAdminException
 Adds a list acl entry to all nodes. More...
 
void addACLEntries (nACL acl, nNode[] nodes) throws nAdminIllegalArgumentException, nBaseAdminException
 Adds a list acl entry to all nodes contained with in the array of nNodes. More...
 
void addACLEntry (nACLEntry entry) throws nInsufficientPrivilegesException, nNodeException, nBaseAdminException
 Adds a specific acl entry to all known nodes within the nContainer node. More...
 
void addACLEntry (nACLEntry entry, boolean allChannels, boolean allQueues, boolean allServices) throws nInsufficientPrivilegesException, nNodeException, nBaseAdminException
 Adds a specific acl entry to all known nodes within the nContainer node. More...
 
void addACLEntry (nACLEntry entry, boolean allChannels, boolean allQueues) throws nInsufficientPrivilegesException, nNodeException, nBaseAdminException
 Adds a specific acl entry to all known nodes within the nContainer node. More...
 
void addACLEntry (nACLEntry entry, boolean allChannels, boolean allQueues, boolean allServices, boolean realm) throws nBaseAdminException
 Adds a specific acl entry to all known nodes within the nContainer node. More...
 
void addACLEntry (boolean realmLevel, nACLEntry entry, boolean allChannels, boolean allQueues) throws nBaseAdminException
 Adds a specific acl entry to all known nodes within the nContainer node. More...
 
void closed (nRealmNode node)
 Called when the nRealmNode is closed, for internal use only. More...
 
nNode findNode (String name) throws nAdminIllegalArgumentException
 Given a name of the form /container/container/name this function will locate the name object and return it, or null if that object can not be found. More...
 
nNode findNode (nNode node) throws nAdminIllegalArgumentException
 Given a name of the form /container/container/name this function will locate the nNode object and return it, or null if that can not be found. More...
 
nNode findNode (nNode node, boolean searchChildren) throws nAdminIllegalArgumentException
 Given a name of the form /container/container/name this function will locate the name object and return it, or null if that can not be found. More...
 
nNode getNextSibling ()
 Method to return the next sibling from this node's parent. More...
 
Enumeration getNodes ()
 Returns an Enumeration of all the nodes under this container. More...
 
nRealmNode getRealmAt (String name) throws nAdminIllegalArgumentException
 Given a mount point this function will return a realm if one exists at the specified mount point. More...
 
nRealmNode getRealmNode ()
 Get the realm node at the root of this container node. More...
 
int getSize ()
 Returns the number of nodes under this container. More...
 
int getTotalNodes ()
 Returns the total number of nodes within this container and all subsequent children by traversing the entire structure beneath this container node. More...
 
boolean hasRealmAt (String name) throws nAdminIllegalArgumentException
 Given a mount point this function will determine if this container contains a mounted realm at the specified mount point. More...
 
void modACLEntries (nACL acl) throws nAdminIllegalArgumentException, nBaseAdminException
 Modifies a list of acl entry to all known nodes within the nContainer node. More...
 
void modACLEntries (nACL acl, nNode[] nodes) throws nAdminIllegalArgumentException, nBaseAdminException
 Modifies a list of acl entry to all nodes contained with in the array of nNodes. More...
 
void modACLEntry (nACLEntry entry) throws nInsufficientPrivilegesException, nNodeException, nBaseAdminException
 modifies a specific acl entry's permissions for all known nodes within the nContainer node. More...
 
void modACLEntry (nACLEntry entry, boolean allChannels, boolean allQueues, boolean allServices) throws nInsufficientPrivilegesException, nNodeException, nBaseAdminException
 modifies a specific acl entry's permissions for all known nodes within the nContainer node. More...
 
void modACLEntry (nACLEntry entry, boolean allChannels, boolean allQueues) throws nInsufficientPrivilegesException, nNodeException, nBaseAdminException
 modifies a specific acl entry's permissions for all known nodes within the nContainer node. More...
 
void modACLEntry (nACLEntry entry, boolean allChannels, boolean allQueues, boolean allServices, boolean realm) throws nInsufficientPrivilegesException, nNodeException, nBaseAdminException
 modifies a specific acl entry's permissions for all known nodes within the nContainer node. More...
 
void modACLEntry (boolean realmLevel, nACLEntry entry, boolean allChannels, boolean allQueues) throws nInsufficientPrivilegesException, nNodeException, nBaseAdminException
 modifies a specific acl entry's permissions for all known nodes within the nContainer node. More...
 
void removeACLEntries (nACL acl) throws nAdminIllegalArgumentException, nBaseAdminException
 Removes a list of acl entries from all known nodes within the nContainer node. More...
 
void removeACLEntries (nACL acl, nNode[] nodes) throws nAdminIllegalArgumentException, nBaseAdminException
 Removes a list of acl entries from all nodes contained with in the array of nNodes. More...
 
void removeACLEntry (nACLEntry entry) throws nInsufficientPrivilegesException, nNodeException, nBaseAdminException
 removes a specific acl entry from all known nodes within the nContainer node. More...
 
void removeACLEntry (nACLEntry entry, boolean allChannels, boolean allQueues, boolean allServices) throws nInsufficientPrivilegesException, nNodeException, nBaseAdminException
 removes a specific acl entry from all known nodes within the nContainer node. More...
 
void removeACLEntry (nACLEntry entry, boolean allChannels, boolean allQueues) throws nInsufficientPrivilegesException, nNodeException, nBaseAdminException
 removes a specific acl entry from all known nodes within the nContainer node. More...
 
void removeACLEntry (nACLEntry entry, boolean allChannels, boolean allQueues, boolean allServices, boolean realm) throws nInsufficientPrivilegesException, nNodeException, nBaseAdminException
 Removes a specific acl entry from all known nodes within the nContainer node. More...
 
void removeACLEntry (boolean realmLevel, nACLEntry entry, boolean allChannels, boolean allQueues) throws nInsufficientPrivilegesException, nNodeException, nBaseAdminException
 Removes a specific acl entry from all known nodes within the nContainer node. More...
 
void setACL (nACL acl) throws nInsufficientPrivilegesException, nNodeException, nBaseAdminException
 Changes the entire ACL entries for all nodes within this container node. More...
 
void setACL (nACL acl, boolean allChannels, boolean allQueues, boolean allServices) throws nInsufficientPrivilegesException, nNodeException, nBaseAdminException
 Changes the entire ACL entries for the selected nodes with the new ACL passed in. More...
 
void setACL (nACL acl, boolean allChannels, boolean allQueues) throws nInsufficientPrivilegesException, nNodeException, nBaseAdminException
 Changes the entire ACL entries for the selected nodes with the new ACL passed in. More...
 
- Public Member Functions inherited from com.pcbsys.nirvana.nAdminAPI.nNode
boolean equals (long aLong)
 Needed as part of the SortedObject interface.
 
synchronized String getAbsolutePath ()
 This function walks the tree to the root to generate a fully qualified name for this node. More...
 
String getName ()
 Returns the generic name of this node within the namespace. More...
 
nNode getParent ()
 Returns this nodes parent node. More...
 
String getRelativePath (nNode top) throws nAdminIllegalArgumentException
 This method returns the relative path from this node to the nNode passed. More...
 
boolean isMatch (Object item)
 Compares this object with the passed object. More...
 
boolean lessThan (long aLong)
 Needed as part of the SortedObject interface.
 
boolean lessThan (Object item)
 Compares this object with the passed object. More...
 

Static Public Member Functions

static nClusterNode create (final String clusterName, final nClusterMemberConfiguration[] realms) throws nSessionNotConnectedException, nSecurityException, nRequestTimedOutException, nIllegalArgumentException, nSessionPausedException, nUnexpectedResponseException, nRealmUnreachableException, nNameSpaceConflictException, nRealmNotFoundException
 Creates a new cluster with the supplied array of nClusterMemberConfiguration. More...
 
static nClusterNode create (final String clusterName, final nClusterMemberConfiguration[] realms, boolean convertLocal) throws nSessionNotConnectedException, nSecurityException, nRequestTimedOutException, nIllegalArgumentException, nSessionPausedException, nUnexpectedResponseException, nRealmUnreachableException, nNameSpaceConflictException, nRealmNotFoundException
 Creates a new cluster with the supplied array of nClusterMemberConfiguration. More...
 
static nClusterNode create (final String clusterName, final nClusterMemberConfiguration[] realms, boolean convertLocal, nClusterConversionStatus callback) throws nSessionNotConnectedException, nSecurityException, nRequestTimedOutException, nIllegalArgumentException, nSessionPausedException, nUnexpectedResponseException, nRealmUnreachableException, nNameSpaceConflictException, nRealmNotFoundException
 Creates a new cluster with the supplied array of nClusterMemberConfiguration. More...
 
static nClusterNode create (final String clusterName, final nClusterMemberConfiguration[] realms, boolean convertLocal, TransientStoreAction transientStoreAction, nClusterConversionStatus callback) throws nSessionNotConnectedException, nSecurityException, nRequestTimedOutException, nIllegalArgumentException, nSessionPausedException, nUnexpectedResponseException, nRealmUnreachableException, nNameSpaceConflictException, nRealmNotFoundException
 Creates a new cluster with the supplied array of nClusterMemberConfiguration. More...
 
static nClusterNode find (final String clusterName)
 Returns the nClusterNode for the specified clusterName. More...
 
static nClusterNode getInstance (final String rname) throws nBaseAdminException, nIllegalArgumentException
 Creates an instance of a nClusterNode for any cluster found on the realm specified by the rname. More...
 
static nClusterNode getInstance (final nSessionAttributes attr, final String username) throws nBaseAdminException
 Creates an instance of a nClusterNode for any cluster found on the realm specified by the nSessionAttributes and the username. More...
 
static nClusterNode getInstance (final nSessionAttributes attr) throws nBaseAdminException
 Creates an instance of a nClusterNode for any cluster found on the realm specified by the nSessionAttributes. More...
 
static Vector getKnownClusters ()
 Return a Vector of nCluster nodes. More...
 

Detailed Description

Contains the status and configuration of a Nirvana cluster.

Each Nirvana cluster is made up of multiple Nirvana Realm servers and this group is given a name, the Cluster Name. The class supplies helper functions to query, create and delete clusters.

Member Function Documentation

void com.pcbsys.nirvana.nAdminAPI.nClusterNode.addConnectionListener ( final nClusterConnectionListener  listener) throws nBaseAdminException

Adds a nClusterConnectionListener to the cluster to receive callbacks as connections are made or lost to any realms within the cluster.

Parameters
listenerto register for callbacks.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.addConnectionListenerToAllLeafNodes ( final nConnectionListener  listener) throws nBaseAdminException

Adds a nConnectionListener to each nLeaNode of each nRealmNode in the cluster.

Parameters
listenerto register for callbacks.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.addConnectionListenerToAllServiceNodes ( final nConnectionListener  listener) throws nBaseAdminException

Adds a nConnectionListener to each nServiceNode of each nRealmNode in the cluster.

Parameters
listenerto register for callbacks.
Deprecated:
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.addListener ( final nClusterEventListener  listener)

Adds a nClusterEventListener to the cluster to receive callbacks as the state of the cluster changes.

Parameters
listenerto register for callbacks.

Adds a new node to an existing cluster.

Parameters
nodedetails about the new node to add.
Exceptions
nSessionNotConnectedExceptionif unable to connect to the new node.
nRequestTimedOutExceptionif the node fails to respond within the timout period.
nSecurityExceptionif the client has no administration priviliges on the node.
nDuplicateChannelNameExceptionif local store names match cluster store names upon adding member.
nBaseClientExceptionif any unexpected exceptions are raised.
boolean com.pcbsys.nirvana.nAdminAPI.nClusterNode.canBeMaster ( final nRealmNode  node) throws nBaseClientException

Tests to see if the supplied node can be master of the cluster.

Parameters
nodeto test.
Returns
true if the node is defined as able to be master.
Exceptions
nSecurityExceptionif the client is not authorized.
nSessionNotConnectedExceptionif the node is not connected.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.closed ( nRealmNode  node)

Called when the nRealmNode is closed, for internal use only.

Parameters
nodeThe nRealmNode which has been closed.

Creates a new cluster with the supplied array of nClusterMemberConfiguration.

Parameters
clusterNameName of the new cluster.
realmsarray of nClusterMemberConfiguration to use to generate the cluster.
Returns
nClusterNode of the resulting cluster.
Exceptions
nSessionNotConnectedExceptionif unable to connect to any of the realms.
nSecurityExceptionif no administration rights on any of the realms.
nRequestTimedOutExceptionif any of the realms fail to respond within the time out period.
nIllegalArgumentExceptionif any of the realms specify the same physical realm.
nSessionPausedExceptionif any of the realms sessions are paused.
nUnexpectedResponseExceptionif any of the realms respond incorrectly.
nRealmUnreachableExceptionif any of the realms are currently unreachable.
nNameSpaceConflictExceptionif any of the realms conflict with anothers namespace.
nRealmNotFoundExceptionif any of the realms are not found.

Creates a new cluster with the supplied array of nClusterMemberConfiguration.

Parameters
clusterNameName of the new cluster.
realmsarray of nClusterMemberConfiguration to use to generate the cluster.
convertLocalFlag to indicate that the first master realm in the list should have the local stores converted to cluster wide stores
Returns
nClusterNode of the resulting cluster.
Exceptions
nSessionNotConnectedExceptionif unable to connect to any of the realms.
nSecurityExceptionif no administration rights on any of the realms.
nRequestTimedOutExceptionif any of the realms fail to respond within the time out period.
nIllegalArgumentExceptionif any of the realms specify the same physical realm.
nSessionPausedExceptionif any of the realms sessions are paused.
nUnexpectedResponseExceptionif any of the realms respond incorrectly.
nRealmUnreachableExceptionif any of the realms are currently unreachable.
nNameSpaceConflictExceptionif any of the realms conflict with anothers namespace.
nRealmNotFoundExceptionif any of the realms are not found.

Creates a new cluster with the supplied array of nClusterMemberConfiguration.

Parameters
clusterNameName of the new cluster.
realmsarray of nClusterMemberConfiguration to use to generate the cluster.
convertLocalFlag to indicate that the first master realm in the list should have the local stores converted to cluster wide stores
callbackA callback to indicate the status of the cluster formation. Useful when converting an exisiting realm with stores into a cluster
Returns
nClusterNode of the resulting cluster.
Exceptions
nSessionNotConnectedExceptionif unable to connect to any of the realms.
nSecurityExceptionif no administration rights on any of the realms.
nRequestTimedOutExceptionif any of the realms fail to respond within the time out period.
nIllegalArgumentExceptionif any of the realms specify the same physical realm.
nSessionPausedExceptionif any of the realms sessions are paused.
nUnexpectedResponseExceptionif any of the realms respond incorrectly.
nRealmUnreachableExceptionif any of the realms are currently unreachable.
nNameSpaceConflictExceptionif any of the realms conflict with anothers namespace.
nRealmNotFoundExceptionif any of the realms are not found.
See Also
nClusterConversionStatus

Creates a new cluster with the supplied array of nClusterMemberConfiguration.

Parameters
clusterNameName of the new cluster.
realmsarray of nClusterMemberConfiguration to use to generate the cluster.
convertLocalFlag to indicate that the first master realm in the list should have the local stores converted to cluster wide stores.
transientStoreActionThis parameter specifies what action to be performed if there are local transient stores present in one of the realms. If there are such stores and the action is TransientStoreAction.FAIL, this method will throw nIllegalArgumentException. This parameter is relevant only when convertLocal parameter is true.
callbackA callback to indicate the status of the cluster formation. Useful when converting an exisiting realm with stores into a cluster.
Returns
nClusterNode of the resulting cluster.
Exceptions
nSessionNotConnectedExceptionif unable to connect to any of the realms.
nSecurityExceptionif no administration rights on any of the realms.
nRequestTimedOutExceptionif any of the realms fail to respond within the time out period.
nIllegalArgumentExceptionif any of the realms specify the same physical realm.
nSessionPausedExceptionif any of the realms sessions are paused.
nUnexpectedResponseExceptionif any of the realms respond incorrectly.
nRealmUnreachableExceptionif any of the realms are currently unreachable.
nNameSpaceConflictExceptionif any of the realms conflict with another namespace.
nRealmNotFoundExceptionif any of the realms are not found.
See Also
nClusterConversionStatus
TransientStoreAction
nClusterSite com.pcbsys.nirvana.nAdminAPI.nClusterNode.createSite ( String  name,
String  initialRealm 
) throws Exception

Method that allows you to create a site from a cluster node.

Parameters
namethe name of the site to create
initialRealmthe initial realm that will be added to the site
Returns
a new cluster site object
Exceptions
Exceptionif the site was not able to be created
nClusterSite com.pcbsys.nirvana.nAdminAPI.nClusterNode.createSite ( String  name,
final String  initialRealm,
boolean  waitForSync 
) throws nRequestTimedOutException, Exception

Method that allows you to create a site from a cluster node.

Parameters
namethe name of the site to create
initialRealmthe initial realm that will be added to the site
waitForSyncset to true to block the execution until the site creation has been propagated in the cluster
Returns
a new cluster site object
Exceptions
nRequestTimedOutExceptionif the site was not created in the default event wait time interval
Exceptionif the site was not able to be created
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.delConnectionListener ( final nClusterConnectionListener  listener) throws nBaseAdminException

Removes a nClusterConnectionListener from the cluster.

Parameters
listenerto register for callbacks.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.deleteMember ( nRealmNode  node) throws nBaseClientException, nSessionNotConnectedException, nSecurityException

Removes the specified realm from the cluster.

The cluster must be running and all members of the cluster online for this to work correctly.

Parameters
nodeto remove from the cluster.
Exceptions
nBaseClientExceptionif any nodes fail during the process.
nSessionNotConnectedExceptionif any of the nodes are not connected.
nSecurityExceptionif the client is not authorised.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.deleteMember ( nRealmNode  node,
boolean  deleteStore 
) throws nBaseClientException, nSessionNotConnectedException, nSecurityException

Removes the specified realm from the cluster.

The cluster must be running and all members of the cluster online for this to work correctly.

Parameters
nodeto remove from the cluster.
deleteStoreflag to indicate that the call should also delete ALL cluster stores
Exceptions
nBaseClientExceptionif any nodes fail during the process.
nSessionNotConnectedExceptionif any of the nodes are not connected.
nSecurityExceptionif the client is not authorised.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.deleteSite ( nClusterSite  site) throws Exception

Method that allows you to delete a site.

Parameters
sitethe cluster site to delete
Exceptions
Exceptionif the site was not able to be deleted
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.delListener ( final nClusterEventListener  listener)

Deregisters a nClusterEventListener from the cluster for callbacks.

Parameters
listenerto be removed.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.deregisterRemoteCluster ( nClusterNode  remoteCluster) throws Exception

Removes the remote node given by the parameter remoteCluster from this cluster node.

If the remoteCluster is null, or remoteCluster is the same as this cluster node, this method will throw an Exception.

Parameters
remoteClusterThe remoteCluster to remove from this cluster nodes realm list.
Exceptions
ExceptionIf remoteCluster is null, or is the same as this cluster node.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.destroy ( ) throws nBaseClientException, nSessionNotConnectedException, nSecurityException

Deletes the cluster and removes all known realms from the cluster.

Exceptions
nBaseClientExceptionif any nodes fail during the process.
nSessionNotConnectedExceptionif any of the nodes are not connected.
nSecurityExceptionif the client is not authorised.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.destroy ( boolean  deleteStore) throws nBaseClientException, nSessionNotConnectedException, nSecurityException

Deletes the cluster and removes all known realms from the cluster.

Parameters
deleteStoreflag to indicate that the call should also delete ALL cluster stores
Exceptions
nBaseClientExceptionif any nodes fail during the process.
nSessionNotConnectedExceptionif any of the nodes are not connected.
nSecurityExceptionif the client is not authorised.
static nClusterNode com.pcbsys.nirvana.nAdminAPI.nClusterNode.find ( final String  clusterName)
static

Returns the nClusterNode for the specified clusterName.

Parameters
clusterNamename of the cluster to lookup.
Returns
nClusterNode or null if no such cluster is found.
Vector<nClusterStatus> com.pcbsys.nirvana.nAdminAPI.nClusterNode.getClusterConnectionStatus ( )

Returns a Vector of nClusterStatus which contains the current cluster status.

Returns
Vector of nClusterStatus.
static nClusterNode com.pcbsys.nirvana.nAdminAPI.nClusterNode.getInstance ( final String  rname) throws nBaseAdminException, nIllegalArgumentException
static

Creates an instance of a nClusterNode for any cluster found on the realm specified by the rname.

Parameters
rnameNirvana Realm server URL
Returns
If any cluster has been defined on the specified realm, will return the nClusterNode relevant.
Exceptions
nBaseAdminExceptionif the user has no administration priviliges
nIllegalArgumentExceptionif the rname is not valid
static nClusterNode com.pcbsys.nirvana.nAdminAPI.nClusterNode.getInstance ( final nSessionAttributes  attr,
final String  username 
) throws nBaseAdminException
static

Creates an instance of a nClusterNode for any cluster found on the realm specified by the nSessionAttributes and the username.

Parameters
attrSession attributes to connect to the remote Nirvana Realm
usernameto use to authenticate
Returns
If any cluster has been defined on the specified realm, will return the nClusterNode relevant.
Exceptions
nBaseAdminExceptionif unable to connect to the remote realm
static nClusterNode com.pcbsys.nirvana.nAdminAPI.nClusterNode.getInstance ( final nSessionAttributes  attr) throws nBaseAdminException
static

Creates an instance of a nClusterNode for any cluster found on the realm specified by the nSessionAttributes.

Parameters
attrSession attributes to connect to the remote Nirvana Realm
Returns
If any cluster has been defined on the specified realm, will return the nClusterNode relevant.
Exceptions
nBaseAdminExceptionif unable to connect to the remote realm
static Vector com.pcbsys.nirvana.nAdminAPI.nClusterNode.getKnownClusters ( )
static

Return a Vector of nCluster nodes.

Returns
Vector of nodes.
Set<nClusterNode> com.pcbsys.nirvana.nAdminAPI.nClusterNode.getKnownRemoteClusters ( ) throws nRealmUnreachableException

Returns the set of clusters that this cluster has inter-cluster connections to.

Returns
List of clusters which have inter-cluster connections to this one
Exceptions
nRealmUnreachableExceptionIf master is not currently reachable.
nRealmNode com.pcbsys.nirvana.nAdminAPI.nClusterNode.getMaster ( )

Returns the current master of the cluster.

If the master is not currently connected it will return null

Returns
String name of the master.
nRealmNode com.pcbsys.nirvana.nAdminAPI.nClusterNode.getMaster ( long  timeout) throws Exception

Returns the current master of the cluster.

Parameters
timeoutthe amount of time in milliseconds to wait for the connection to the master
Returns
String name of the master.
int com.pcbsys.nirvana.nAdminAPI.nClusterNode.getNoOfSites ( )

Returns the number of defined nClusterSite objects.

Returns
a count of nClusterSite objects
See Also
nClusterSite
nClusterSite com.pcbsys.nirvana.nAdminAPI.nClusterNode.getSite ( String  site)

Method to get the site, if any, that this cluster is part of.

Parameters
siteThe string name of the site to look for this cluster node in.
Returns
nClusterSite representing the site that this cluster node is in.
Iterator com.pcbsys.nirvana.nAdminAPI.nClusterNode.getSites ( )

Returns an iterator of nClusterSite objects.

Returns
an iterator of nClusterSite objects
See Also
nClusterSite
boolean com.pcbsys.nirvana.nAdminAPI.nClusterNode.hasMember ( final nRealmNode  node) throws nSecurityException, nBaseClientException

Tests to see if the supplied node is part of the cluster.

Parameters
nodeto test.
Returns
true if the node is defined in the cluster else false.
Exceptions
nSecurityExceptionif the client is not authorized.
nBaseClientExceptionif the node is not connected.
boolean com.pcbsys.nirvana.nAdminAPI.nClusterNode.hasMember ( final String  realm) throws nBaseClientException

Tests to see if the supplied realm name is part of the cluster.

Parameters
realmname to test.
Returns
true if the realm is defined in the cluster else false.
Exceptions
nBaseClientExceptionif the node is not connected.
Since
4.0
boolean com.pcbsys.nirvana.nAdminAPI.nClusterNode.hasquorum ( )

Tests to see if the cluster has quorum and is functioning.

Quorin is defined as the cluster having the ( number of realms ) / 2 +1 being online.

Returns
boolean indicating the current state.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.joinRemoteClusterStore ( nLeafNode  source,
nLeafNode  destination,
boolean  isRouted,
int  hopCount,
String  selector,
boolean  allowPurge 
) throws Exception

Joins the stores between two different clusters together.

Additional parameters specify whether events will be routed, the maximum number of hop counts for events to pass through this join, a selector, and whether or not to allow purging.

Parameters
sourceThe source leaf node for this join
destinationThe destination leaf node for this join
isRoutedboolean which determines if events will be routed
hopCountinteger specifying the maximum hop count that events may have to pass through this join
selectora selector which filters events over this join
allowPurgeboolean to allow purging of events over this join
Exceptions
ExceptionIf source or destination are null, an exception will be thrown. If source or destination are not cluster wide channels/queues, an exception will be thrown. If source and destination reside on the same cluster, an exception will be thrown.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.modifyMember ( nClusterMemberConfiguration  config) throws nBaseClientException, nDuplicateChannelNameException

Modifies the specified realm in the cluster as far as the CanBeMaster flag.

The cluster must be running and all members of the cluster online for this to work correctly.

Parameters
configThe ClusterMemberConfiguration object refering to the node and configuration
Exceptions
nBaseClientExceptionif any nodes fail during the process.
nSessionNotConnectedExceptionif any of the nodes are not connected.
nDuplicateChannelNameExceptionif local store names match cluster store names upon modifying members.
nSecurityExceptionif the client is not authorised.
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.registerRemoteCluster ( nClusterNode  remoteCluster) throws Exception

Adds the realm nodes in the remoteCluster node to this clusterNode, creating a logical connection between them.

Parameters
remoteClusternClusterNode containing the remote cluster node to add to this cluster node
Exceptions
ExceptionIf the remoteCluster is null, or if this cluster is the same as remoteCluster.