- com
- pcbsys
- nirvana
- nAdminAPI
- nClusterNode
Contains the status and configuration of a Nirvana cluster. More...
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< nClusterStatus > | getClusterConnectionStatus () |
Returns a Vector of nClusterStatus which contains the current cluster status. More... | |
Set< nClusterNode > | getKnownRemoteClusters () 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 | 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... | |
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.
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.
listener | to 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.
listener | to 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.
listener | to register for callbacks. |
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.
listener | to register for callbacks. |
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.addMember | ( | final nClusterMemberConfiguration | node | ) | throws nSessionNotConnectedException, nRequestTimedOutException, nSecurityException, nBaseClientException, nDuplicateChannelNameException |
Adds a new node to an existing cluster.
node | details about the new node to add. |
nSessionNotConnectedException | if unable to connect to the new node. |
nRequestTimedOutException | if the node fails to respond within the timout period. |
nSecurityException | if the client has no administration priviliges on the node. |
nDuplicateChannelNameException | if local store names match cluster store names upon adding member. |
nBaseClientException | if 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.
node | to test. |
nSecurityException | if the client is not authorized. |
nSessionNotConnectedException | if the node is not connected. |
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.closed | ( | nRealmNode | node | ) |
Called when the nRealmNode is closed, for internal use only.
node | The nRealmNode which has been closed. |
|
static |
Creates a new cluster with the supplied array of nClusterMemberConfiguration.
clusterName | Name of the new cluster. |
realms | array of nClusterMemberConfiguration to use to generate the cluster. |
nSessionNotConnectedException | if unable to connect to any of the realms. |
nSecurityException | if no administration rights on any of the realms. |
nRequestTimedOutException | if any of the realms fail to respond within the time out period. |
nIllegalArgumentException | if any of the realms specify the same physical realm. |
nSessionPausedException | if any of the realms sessions are paused. |
nUnexpectedResponseException | if any of the realms respond incorrectly. |
nRealmUnreachableException | if any of the realms are currently unreachable. |
nNameSpaceConflictException | if any of the realms conflict with anothers namespace. |
nRealmNotFoundException | if any of the realms are not found. |
|
static |
Creates a new cluster with the supplied array of nClusterMemberConfiguration.
clusterName | Name of the new cluster. |
realms | array of nClusterMemberConfiguration to use to generate the cluster. |
convertLocal | Flag to indicate that the first master realm in the list should have the local stores converted to cluster wide stores |
nSessionNotConnectedException | if unable to connect to any of the realms. |
nSecurityException | if no administration rights on any of the realms. |
nRequestTimedOutException | if any of the realms fail to respond within the time out period. |
nIllegalArgumentException | if any of the realms specify the same physical realm. |
nSessionPausedException | if any of the realms sessions are paused. |
nUnexpectedResponseException | if any of the realms respond incorrectly. |
nRealmUnreachableException | if any of the realms are currently unreachable. |
nNameSpaceConflictException | if any of the realms conflict with anothers namespace. |
nRealmNotFoundException | if any of the realms are not found. |
|
static |
Creates a new cluster with the supplied array of nClusterMemberConfiguration.
clusterName | Name of the new cluster. |
realms | array of nClusterMemberConfiguration to use to generate the cluster. |
convertLocal | Flag to indicate that the first master realm in the list should have the local stores converted to cluster wide stores |
callback | A callback to indicate the status of the cluster formation. Useful when converting an exisiting realm with stores into a cluster |
nSessionNotConnectedException | if unable to connect to any of the realms. |
nSecurityException | if no administration rights on any of the realms. |
nRequestTimedOutException | if any of the realms fail to respond within the time out period. |
nIllegalArgumentException | if any of the realms specify the same physical realm. |
nSessionPausedException | if any of the realms sessions are paused. |
nUnexpectedResponseException | if any of the realms respond incorrectly. |
nRealmUnreachableException | if any of the realms are currently unreachable. |
nNameSpaceConflictException | if any of the realms conflict with anothers namespace. |
nRealmNotFoundException | if any of the realms are not found. |
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.
name | the name of the site to create |
initialRealm | the initial realm that will be added to the site |
Exception | if 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.
name | the name of the site to create |
initialRealm | the initial realm that will be added to the site |
waitForSync | set to true to block the execution until the site creation has been propagated in the cluster |
nRequestTimedOutException | if the site was not created in the default event wait time interval |
Exception | if 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.
listener | to 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.
node | to remove from the cluster. |
nBaseClientException | if any nodes fail during the process. |
nSessionNotConnectedException | if any of the nodes are not connected. |
nSecurityException | if 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.
node | to remove from the cluster. |
deleteStore | flag to indicate that the call should also delete ALL cluster stores |
nBaseClientException | if any nodes fail during the process. |
nSessionNotConnectedException | if any of the nodes are not connected. |
nSecurityException | if the client is not authorised. |
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.deleteSite | ( | nClusterSite | site | ) | throws Exception |
Method that allows you to delete a site.
site | the cluster site to delete |
Exception | if 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.
listener | to 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.
remoteCluster | The remoteCluster to remove from this cluster nodes realm list. |
Exception | If 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.
nBaseClientException | if any nodes fail during the process. |
nSessionNotConnectedException | if any of the nodes are not connected. |
nSecurityException | if 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.
deleteStore | flag to indicate that the call should also delete ALL cluster stores |
nBaseClientException | if any nodes fail during the process. |
nSessionNotConnectedException | if any of the nodes are not connected. |
nSecurityException | if the client is not authorised. |
|
static |
Returns the nClusterNode for the specified clusterName.
clusterName | name of the cluster to lookup. |
Vector<nClusterStatus> com.pcbsys.nirvana.nAdminAPI.nClusterNode.getClusterConnectionStatus | ( | ) |
Returns a Vector of nClusterStatus which contains the current cluster status.
|
static |
Creates an instance of a nClusterNode for any cluster found on the realm specified by the rname.
rname | Nirvana Realm server URL |
nBaseAdminException | if the user has no administration priviliges |
nIllegalArgumentException | if the rname is not valid |
|
static |
Creates an instance of a nClusterNode for any cluster found on the realm specified by the nSessionAttributes and the username.
attr | Session attributes to connect to the remote Nirvana Realm |
username | to use to authenticate |
nBaseAdminException | if unable to connect to the remote realm |
|
static |
Creates an instance of a nClusterNode for any cluster found on the realm specified by the nSessionAttributes.
attr | Session attributes to connect to the remote Nirvana Realm |
nBaseAdminException | if unable to connect to the remote realm |
|
static |
Return a Vector of nCluster nodes.
Set<nClusterNode> com.pcbsys.nirvana.nAdminAPI.nClusterNode.getKnownRemoteClusters | ( | ) | throws nRealmUnreachableException |
Returns the set of clusters that this cluster has inter-cluster connections to.
nRealmUnreachableException | If 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
nRealmNode com.pcbsys.nirvana.nAdminAPI.nClusterNode.getMaster | ( | long | timeout | ) | throws Exception |
Returns the current master of the cluster.
timeout | the amount of time in milliseconds to wait for the connection to the master |
int com.pcbsys.nirvana.nAdminAPI.nClusterNode.getNoOfSites | ( | ) |
Returns the number of defined nClusterSite objects.
nClusterSite com.pcbsys.nirvana.nAdminAPI.nClusterNode.getSite | ( | String | site | ) |
Method to get the site, if any, that this cluster is part of.
site | The string name of the site to look for this cluster node in. |
Iterator com.pcbsys.nirvana.nAdminAPI.nClusterNode.getSites | ( | ) |
Returns an iterator of nClusterSite objects.
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.
node | to test. |
nSecurityException | if the client is not authorized. |
nBaseClientException | if 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.
realm | name to test. |
nBaseClientException | if the node is not connected. |
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.
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.
source | The source leaf node for this join |
destination | The destination leaf node for this join |
isRouted | boolean which determines if events will be routed |
hopCount | integer specifying the maximum hop count that events may have to pass through this join |
selector | a selector which filters events over this join |
allowPurge | boolean to allow purging of events over this join |
Exception | If 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.
config | The ClusterMemberConfiguration object refering to the node and configuration |
nBaseClientException | if any nodes fail during the process. |
nSessionNotConnectedException | if any of the nodes are not connected. |
nDuplicateChannelNameException | if local store names match cluster store names upon modifying members. |
nSecurityException | if 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.
remoteCluster | nClusterNode containing the remote cluster node to add to this cluster node |
Exception | If the remoteCluster is null, or if this cluster is the same as remoteCluster. |