Contains the status and configuration of a Nirvana cluster. More...
Public Member Functions | |
void | addConnectionListener (nClusterConnectionListener listener) |
Adds a nClusterConnectionListener to the cluster to receive callbacks as connections are made or lost to any realms within the cluster. More... | |
void | addConnectionListenerToAllLeafNodes (nConnectionListener listener) |
Adds a nConnectionListener to each nLeaNode of each nRealmNode in the cluster More... | |
void | addListener (nClusterEventListener listener) |
Adds a nClusterEventListener to the cluster to receive callbacks as the state of the cluster changes. More... | |
void | addMember (nClusterMemberConfiguration node) |
Adds a new node to an existing cluster. More... | |
bool | canBeMaster (nRealmNode node) |
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. More... | |
override void | closed (nRealmNode node) |
Called when the nRealmNode is closed, for internal use only. More... | |
nClusterSite | createSite (string name, string initialRealm) |
Method that allows you to create a site from a cluster node More... | |
void | delConnectionListener (nClusterConnectionListener listener) |
Removes a nClusterConnectionListener from the cluster More... | |
void | deleteMember (nRealmNode node) |
Removes the specified realm from the cluster. More... | |
void | deleteMember (nRealmNode node, bool deleteStore) |
Removes the specified realm from the cluster. More... | |
void | deleteSite (nClusterSite site) |
Method that allows you to delete a site More... | |
void | delListener (nClusterEventListener listener) |
Deregisters a nClusterEventListener from the cluster for callbacks. More... | |
void | deregisterRemoteCluster (nClusterNode remoteCluster) |
Removes a logical connection from this cluster node to a remote cluster node. More... | |
void | destroy () |
Deletes the cluster and removes all known realms from the cluster. More... | |
void | destroy (bool deleteStore) |
Deletes the cluster and removes all known realms from the cluster. More... | |
ArrayList | getClusterConnectionStatus () |
Returns an ArrayList of nClusterStatus which contains the current cluster status. More... | |
nRealmNode | getMaster () |
Returns the current master of the cluster. More... | |
nRealmNode | getMaster (long timeout) |
Returns the current master of the cluster. More... | |
int | getNoOfSites () |
Returns the number of defined nClusterSite objects More... | |
nClusterSite | getSite (string site) |
Returns an nClusterSite object with the specified name More... | |
IEnumerator | getSites () |
Returns an iterator of nClusterSite objects More... | |
bool | hasMember (nRealmNode node) |
Tests to see if the supplied node is part of the cluster. More... | |
bool | hasMember (string realm) |
Tests to see if the supplied realm name is part of the cluster. More... | |
bool | hasquorum () |
Tests to see if the cluster has quorum and is functioning. More... | |
bool | hasSites () |
Indicated whether this node has sites More... | |
void | joinRemoteClusterStore (nLeafNode source, nLeafNode destination, bool isRouted, int hopCount, String selector, bool allowPurge) |
Joins one clustered channel or queue to another clustered channel or queue on a remote cluster. More... | |
void | modifyMember (nClusterMemberConfiguration config) |
Modifies the specified realm in the cluster as far as the CanBeMaster flag. More... | |
void | registerRemoteCluster (nClusterNode remoteCluster) |
Creates a logical connection between this cluster node and another remote cluster node. More... | |
Public Member Functions inherited from com.pcbsys.nirvana.nAdminAPI.nContainer | |
void | addACLEntries (nACL acl) |
Adds a list of acl entry to all known nodes within the nContainer node. More... | |
void | addACLEntries (nACL acl, nNode[] nodes) |
Adds a list acl entry to all nodes contained with in the array of nNodes More... | |
virtual void | addACLEntry (nACLEntry entry) |
Adds a specific acl entry to all known nodes within the nContainer node. More... | |
virtual void | addACLEntry (nACLEntry entry, bool allChannels, bool allQueues, bool allServices) |
Adds a specific acl entry to all known nodes within the nContainer node. More... | |
virtual nNode | findNode (string name) |
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... | |
virtual nNode | findNode (nNode node) |
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... | |
virtual nNode | findNode (nNode node, bool searchChildren) |
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... | |
virtual nNode | getNextSibling (int idx) |
Returns the sibling at position idx from this nodes parent. More... | |
virtual System.Collections.IEnumerator | getNodes () |
Returns an IEnumerator of all the nodes under this container. More... | |
virtual nRealmNode | getRealmAt (string name) |
Given a mount point this function will return a realm if one exists at the specified mount point More... | |
nRealmNode | getRealmNode () |
Get method for the realm node which acts as a container for this object More... | |
virtual int | getSize () |
Returns the number of nodes under this container. More... | |
virtual 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... | |
virtual bool | hasRealmAt (string name) |
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) |
Modifies a list of acl entry to all known nodes within the nContainer node. More... | |
void | modACLEntries (nACL acl, nNode[] nodes) |
Modifies a list of acl entry to all nodes contained with in the array of nNodes More... | |
virtual void | modACLEntry (nACLEntry entry) |
modifies a specific acl entry's permissions for all known nodes within the nContainer node. More... | |
virtual void | modACLEntry (nACLEntry entry, bool allChannels, bool allQueues, bool allServices) |
modifies a specific acl entry's permissions for all known nodes within the nContainer node. More... | |
void | removeACLEntries (nACL acl) |
Removes a list of acl entries from all known nodes within the nContainer node. More... | |
void | removeACLEntries (nACL acl, nNode[] nodes) |
Removes a list of acl entries from all nodes contained with in the array of nNodes More... | |
virtual void | removeACLEntry (nACLEntry entry) |
removes a specific acl entry from all known nodes within the nContainer node. More... | |
virtual void | removeACLEntry (nACLEntry entry, bool allChannels, bool allQueues, bool allServices) |
removes a specific acl entry from all known nodes within the nContainer node. More... | |
virtual void | setACL (nACL acl) |
Replaces the existing ACL with the nACL supplied to all known nodes within the nContainer node. More... | |
virtual void | setACL (nACL acl, bool allChannels, bool allQueues, bool allServices) |
Replaces the existing ACL with the nACL supplied to all known nodes within the nContainer node. More... | |
Public Member Functions inherited from com.pcbsys.nirvana.nAdminAPI.nNode | |
bool | Equals (long aLong) |
Needed as part of the SortedObject interface. More... | |
override bool | Equals (object item) |
Compares this object with the passed object More... | |
virtual string | getAbsolutePath () |
This function walks the tree to the root to generate a fully qualified name for this node More... | |
virtual nNode | getParent () |
Returns this nodes parent node. More... | |
virtual string | getRelativePath (nNode top) |
This method returns the relative path from this node to the nNode passed. More... | |
virtual bool | lessThan (long aLong) |
Needed as part of the SortedObject interface. More... | |
virtual bool | lessThan (object item) |
Compares this object with the passed object. More... | |
Public Member Functions inherited from com.pcbsys.nirvana.client.Observable | |
void | addObserver (IObserver o) |
Adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set. More... | |
int | countObservers () |
Returns the number of observers of this Observable object. More... | |
void | deleteObserver (IObserver o) |
Deletes an observer from the set of observers of this object. More... | |
void | deleteObservers () |
Clears the observer list so that this object no longer has any observers. More... | |
bool | hasChanged () |
Tests if this object has changed. More... | |
void | notifyObservers () |
If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed. More... | |
void | notifyObservers (Object arg) |
If this object has changed, as indicated by the More... | |
Observable () | |
Construct an Observable with zero Observers. More... | |
Static Public Member Functions | |
static nClusterNode | create (string clusterName, nClusterMemberConfiguration[] realms) |
Creates a new cluster with the supplied array of nClusterMemberConfiguration. More... | |
static nClusterNode | create (string clusterName, nClusterMemberConfiguration[] realms, bool convertLocal) |
Creates a new cluster with the supplied array of nClusterMemberConfiguration. More... | |
static nClusterNode | create (string clusterName, nClusterMemberConfiguration[] realms, bool convertLocal, nClusterConversionStatus callback) |
Creates a new cluster with the supplied array of nClusterMemberConfiguration. More... | |
static nClusterNode | find (string clusterName) |
Returns the nClusterNode for the specified clusterName. More... | |
static nClusterNode | getInstance (string rname) |
Creates an instance of a nClusterNode for any cluster found on the realm specified by the rname. More... | |
static nClusterNode | getInstance (nSessionAttributes attr, string username) |
Creates an instance of a nClusterNode for any cluster found on the realm specified by the nSessionAttributes and the username. More... | |
static nClusterNode | getInstance (nSessionAttributes attr) |
Creates an instance of a nClusterNode for any cluster found on the realm specified by the nSessionAttributes. More... | |
static ArrayList | getKnownClusters () |
Return an ArrayList of nCluster nodes. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from com.pcbsys.nirvana.client.Observable | |
void | clearChanged () |
Indicates that this object has no longer changed, or that it has already notified all of its observers of its most recent change, so that the hasChanged method will now return false . More... | |
void | setChanged () |
Marks this Observable object as having been changed; the hasChanged method will now return true . More... | |
Properties inherited from com.pcbsys.nirvana.nAdminAPI.nNode | |
virtual string | Name [get] |
Returns the generic name of this node within the namespace 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 | ( | nClusterConnectionListener | listener | ) |
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 | ( | nConnectionListener | listener | ) |
Adds a nConnectionListener to each nLeaNode of each nRealmNode in the cluster
listener | to register for callbacks. |
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.addListener | ( | 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 | ( | nClusterMemberConfiguration | node | ) |
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. |
nBaseClientException | if any unexpected exceptions are raised. |
bool com.pcbsys.nirvana.nAdminAPI.nClusterNode.canBeMaster | ( | nRealmNode | node | ) |
Tests to see if the supplied node can be master of the cluster.
node | to test. |
nSecurityException | if the client is not authorized. |
nBaseClientException | if the node is not connected. |
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.close | ( | ) |
Closes connections to all realms for the specified Nirvana Realm server.
|
virtual |
Called when the nRealmNode is closed, for internal use only.
node | The nRealmNode which has been closed |
Reimplemented from com.pcbsys.nirvana.nAdminAPI.nContainer.
|
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 | ||
) |
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 |
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.delConnectionListener | ( | nClusterConnectionListener | listener | ) |
Removes a nClusterConnectionListener from the cluster
listener | to register for callbacks. |
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.deleteMember | ( | nRealmNode | node | ) |
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, |
bool | deleteStore | ||
) |
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 | ) |
Method that allows you to delete a site
site | the cluster site to delete |
Exception | if the site was not able to be created |
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.delListener | ( | nClusterEventListener | listener | ) |
Deregisters a nClusterEventListener from the cluster for callbacks.
listener | to be removed. |
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.deregisterRemoteCluster | ( | nClusterNode | remoteCluster | ) |
Removes a logical connection from this cluster node to a remote cluster node.
This method will throw an Exception if the parameter remoteCluster is null, or if it is equal to this object. </summary>
remoteCluster | the cluster node to disconnect from |
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.destroy | ( | ) |
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 | ( | bool | deleteStore | ) |
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. |
ArrayList com.pcbsys.nirvana.nAdminAPI.nClusterNode.getClusterConnectionStatus | ( | ) |
Returns an ArrayList 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 an ArrayList of nCluster nodes.
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 | ) |
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 | ) |
Returns an nClusterSite object with the specified name
site | the name of the site to return |
IEnumerator com.pcbsys.nirvana.nAdminAPI.nClusterNode.getSites | ( | ) |
bool com.pcbsys.nirvana.nAdminAPI.nClusterNode.hasMember | ( | nRealmNode | node | ) |
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. |
bool com.pcbsys.nirvana.nAdminAPI.nClusterNode.hasMember | ( | string | realm | ) |
Tests to see if the supplied realm name is part of the cluster.
realm | name to test. |
nBaseClientException | if the node is not connected. |
bool 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.
bool com.pcbsys.nirvana.nAdminAPI.nClusterNode.hasSites | ( | ) |
Indicated whether this node has sites
<return> true if this node has sites </return>
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.joinRemoteClusterStore | ( | nLeafNode | source, |
nLeafNode | destination, | ||
bool | isRouted, | ||
int | hopCount, | ||
String | selector, | ||
bool | allowPurge | ||
) |
Joins one clustered channel or queue to another clustered channel or queue on a remote cluster.
This method will throw an Exception if the source and destination channel are not clustered. It will also throw an Exception if the source and destination are on the same cluster.</summary>
source | a nLeafNode which acts as the source of events across this join | ||
destination | a nLeafNode which acts as the destination of events across this join | ||
isRouted | if true, events will be routed across this join | ||
hopCount | the maximum hop count events may have to be sent over this join | ||
selector | a string selector which can be used to filter messages over this join
|
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.modifyMember | ( | nClusterMemberConfiguration | config | ) |
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. |
nSecurityException | if the client is not authorised. |
void com.pcbsys.nirvana.nAdminAPI.nClusterNode.registerRemoteCluster | ( | nClusterNode | remoteCluster | ) |
Creates a logical connection between this cluster node and another remote cluster node.
this method will throw an Exception if the remoteCluster parameter is null, or if remoteCluster is equal to this object. </summary>
remoteCluster | the cluster node to connect to |