Interface SleeManagementMBean
-
- All Superinterfaces:
SleeManagementMBean
public interface SleeManagementMBean extends SleeManagementMBean
The SleeManagementMBean interface defines the central management interface for the SLEE. This interface provides extensions to
SleeManagementMBeanfor additional Rhino-specific functionality.
-
-
Field Summary
-
Fields inherited from interface javax.slee.management.SleeManagementMBean
OBJECT_NAME, SLEE_STATE_CHANGE_NOTIFICATION_TYPE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidannotateLog(String logKey, String logLevel, String message, Throwable throwable)Logs a message to all nodes in the cluster using Rhino’s logging subsystem.SleeActualState[]getActualState(int[] nodeIDs)Get the current actual state of the SLEE for each of the specified nodes.ObjectNamegetContainerConfigurationMBean()Get the JMX Object Name of the Container Configuration Management object.SleeDesiredStategetDefaultDesiredState()Get the current default desired state of the SLEE.ObjectNamegetLimiterManagementMBean()Get the JMX Object Name of the Limiter Manager object.ObjectNamegetNamespaceManagementMBean()Get the JMX Object Name of the Namespace Management object.int[]getNodes(SleeState state)Get the set of event-router nodes in the primary component that are in the specified SLEE state.int[]getNodesWithDesiredState()Get the set of node IDs where per-node desired state exists for the SLEE.SleeDesiredStategetPerNodeDesiredState(int nodeID)Get the current per-node desired state of the SLEE on the specified node.SleeDesiredState[]getPerNodeDesiredState(int[] nodeIDs)Get the current per-node desired state of the SLEE for each of the specified nodes.ObjectNamegetRhinoInspectorMBean()Get the JMX Object Name of the Rhino Inspector Housekeeping object.SleeStategetState()Get the current operational state of the SLEE.SleeState[]getState(int[] nodeIDs)Get the current operational state of the SLEE on each of the specified nodes.ObjectNamegetStatsManagementMBean()Get the JMX Object Name of the Stats Management object.ObjectNamegetUsageMBean(String subsystemName)ObjectNamegetUsageMBean(String subsystemName, String paramSetName)ObjectNamegetUsageNotificationManagerMBean(String subsystemName)String[]getUsageParameterSets(String subsystemName)ObjectNamegetUserTransactionManagerMBean()Get the JMX Object Name of the User Transaction Manager object.voidkill(int[] nodeIDs)Forcefully terminate the specified nodes in the cluster.voidreboot(int[] nodeIDs, SleeState[] rebootStates)Deprecated.This method ignores the state of user-defined namespaces.voidreboot(SleeState[] rebootStates)Deprecated.This method ignores the state of user-defined namespaces.voidremovePerNodeDesiredState(int[] nodeIDs)Remove the per-node desired state of the SLEE on each of the specified node(s).voidsetDefaultDesiredState(SleeDesiredState state)Set the default desired state of the SLEE.voidsetPerNodeDesiredState(int[] nodeIDs, SleeDesiredState state)Set the per-node desired state of the SLEE on each of the specified nodes.voidshutdown()Shutdown and terminate the cluster.voidshutdown(boolean restart)Shutdown and terminate the cluster.voidshutdown(int[] nodeIDs)Shutdown and terminate the specified cluster nodes.voidshutdown(int[] nodeIDs, boolean restart)Shutdown and terminate the specified cluster nodes.voidshutdown(int[] nodeIDs, long timeout)Shutdown and terminate the specified cluster nodes.voidshutdown(int[] nodeIDs, long timeout, boolean restart)Shutdown and terminate the specified cluster nodes.voidshutdown(long timeout)Shutdown and terminate the cluster.voidshutdown(long timeout, boolean restart)Shutdown and terminate the cluster.voidshutdownCluster(boolean restart)Initiate a managed shutdown and termination, with optional restart, of all cluster nodes.voidshutdownCluster(long timeout, boolean restart)Initiate a managed shutdown and termination, with optional restart, of all cluster nodes.voidshutdownNodes(int[] nodeIDs, boolean restart)Initiate a managed shutdown and termination, with optional restart, of the specified nodes.voidshutdownNodes(int[] nodeIDs, long timeout, boolean restart)Initiate a managed shutdown and termination, with optional restart, of the specified nodes.voidstart()Start the SLEE’s event routing subsystem on all nodes.voidstart(int[] nodeIDs)Start the SLEE’s event routing subsystem on the specified nodes.voidstop()Stop the SLEE’s event routing subsystem on all nodes.voidstop(int[] nodeIDs)Stop the SLEE’s event routing subsystem on the specified nodes.voidstop(int[] stopNodeIDs, int[] reassignActivitiesToNodeIDs)Stop the SLEE’s event routing subsystem on the specified nodes.-
Methods inherited from interface javax.slee.management.SleeManagementMBean
getAlarmMBean, getDeploymentMBean, getProfileProvisioningMBean, getResourceManagementMBean, getServiceManagementMBean, getSleeName, getSleeVendor, getSleeVersion, getSubsystems, getTraceMBean, hasUsage
-
-
-
-
Method Detail
-
start
void start() throws InvalidStateException, ManagementExceptionStart the SLEE’s event routing subsystem on all nodes.
The SLEE must currently have an effective desired state of
SleeDesiredState.stoppedon at least one live event routing node, as determined byRhinoHousekeepingMBean.getEventRouterNodes(). All per-node desired state for the SLEE is removed by this method and the default desired state of the SLEE is set toSleeDesiredState.running(if it is not already). Before this method returns, an attempt is then made to transition the SLEE to an actual state ofSleeActualState.runningon all event router nodes where the actual state is currentlySleeActualState.stopped. Any node where the SLEE actual state isSleeActualState.stoppingwill wait (asynchronously) until the SLEE reaches theSleeActualState.stoppedstate and then attempt to transition the SELEE back toSleeActualState.running.As a result of this method setting the default desired state to
SleeDesiredState.running, any new event router nodes that boot into the cluster will assume a running state for the SLEE unless per-node desired state is subsequently created to state otherwise.- Specified by:
startin interfaceSleeManagementMBean- Throws:
InvalidStateException- if the effective desired state of the SLEE is notSleeDesiredState.stoppedon any current event router node.ManagementException- if the operational state of the SLEE could not be changed due to a system-level failure.
-
start
void start(int[] nodeIDs) throws NullPointerException, InvalidArgumentException, InvalidStateException, ManagementExceptionStart the SLEE’s event routing subsystem on the specified nodes.
The SLEE must currently have an effective desired state of
SleeDesiredState.stoppedon all the specified nodes. Per-node desired state for the SLEE is created for each specified node if it does not already exist and set toSleeDesiredState.running. Before this method returns, an attempt is then made to transition the SLEE to an actual state ofSleeActualState.runningon all specified nodes that are current live event router nodes where the actual state isSleeActualState.stopped. Any node where the SLEE actual state isSleeActualState.stoppingwill wait (asynchronously) until the SLEE reaches theSleeActualState.stoppedstate and then attempt to transition the SLEE back toSleeActualState.running.When using the savanna clustering mode, the specified nodes do not have to be current cluster members. For example, this method can be used to set the SLEE desired state on nodes yet to be started.
When using the pool clustering mode, this method can only be used to affect the state of the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(). Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To manage state for another node in pool mode, a client must connect directly with that node.This method does not affect the default desired state of the SLEE.
- Parameters:
nodeIDs- the node IDs of the nodes to start the SLEE event-routing functions on.- Throws:
NullPointerException- ifnodeIDsisnull.InvalidArgumentException- ifnodeIDsis zero-length or contains invalid node IDs, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.InvalidStateException- if the effective desired state of the SLEE is notSleeDesiredState.stoppedon all specified nodes.ManagementException- if the operational state of the SLEE could not be changed due to a system-level failure.
-
stop
void stop() throws InvalidStateException, ManagementException
Stop the SLEE’s event routing subsystem on all nodes.
The SLEE must currently have an effective desired state of
SleeDesiredState.runningon at least one live event routing node, as determined byRhinoHousekeepingMBean.getEventRouterNodes(). All per-node desired state for the SLEE is removed by this method and the default desired state of the SLEE is set toSleeDesiredState.stopped(if it is not already). The SLEE then transitions to an actual state ofSleeActualState.stoppingon all event router nodes where the actual state is currentlySleeActualState.runningbefore this method returns.As a result of this method setting the default desired state to
SleeDesiredState.stopped, any new event router nodes that boot into the cluster will assume a stopped state for the SLEE unless per-node desired state is subsequently created to state otherwise.- Specified by:
stopin interfaceSleeManagementMBean- Throws:
InvalidStateException- if the effective desired state of the SLEE is notSleeDesiredState.runningon any current event router node.ManagementException- if the operational state of the SLEE could not be changed due to a system-level failure.
-
stop
void stop(int[] nodeIDs) throws NullPointerException, InvalidArgumentException, InvalidStateException, ManagementException
Stop the SLEE’s event routing subsystem on the specified nodes.
The SLEE must currently have an effective desired state of
SleeDesiredState.runningon all the specified nodes. Per-node desired state for the SLEE is created for each specified node if it does not already exist and set toSleeDesiredState.stopped. The SLEE then transitions to an actual state ofSleeActualState.stoppingon all specified nodes that are current live event router nodes where the actual state isSleeActualState.runningbefore this method returns.When using the savanna clustering mode, the specified nodes do not have to be current cluster members. For example, this method can be used to set the SLEE desired state on nodes yet to be started.
When using the pool clustering mode, this method can only be used to affect the state of the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(). Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To manage state for another node in pool mode, a client must connect directly with that node.This method does not affect the default desired state of the SLEE.
If any resource adaptor entity owns replicated activities on the stopping nodes then those activities are left to drain normally by this method. If ownership of these activities should be reassigned to allow the SLEE to return to the
SleeActualState.stoppedstate quicker thenstop(int[], int[])should be used instead. Alternatively replicated activities may be reassigned for individual resource adaptor entities using theResourceManagementMBean.reassignActivities(String, int[], int[])method.- Parameters:
nodeIDs- the node IDs of the nodes to stop the SLEE event-routing functions on.- Throws:
NullPointerException- ifnodeIDsisnull.InvalidArgumentException- ifnodeIDsis zero-length or contains invalid node IDs, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.InvalidStateException- if the effective desired state of the SLEE is notSleeDesiredState.runningon all specified nodes.ManagementException- if the operational state of the SLEE could not be changed due to a system-level failure.
-
stop
void stop(int[] stopNodeIDs, int[] reassignActivitiesToNodeIDs) throws NullPointerException, InvalidArgumentException, InvalidStateException, ManagementExceptionStop the SLEE’s event routing subsystem on the specified nodes.
The SLEE must currently have an effective desired state of
SleeDesiredState.runningon all the specified nodes. Per-node desired state for the SLEE is created for each specified node if it does not already exist and set toSleeDesiredState.stopped. The SLEE then transitions to an actual state ofSleeActualState.stoppingon all specified nodes that are current live event router nodes where the actual state isSleeActualState.runningbefore this method returns.When using the savanna clustering mode, the specified nodes do not have to be current cluster members. For example, this method can be used to set the SLEE desired state on nodes yet to be started.
When using the pool clustering mode, activity reassignment using this method is not possible, and this method can only be used as a synonym for
stop(int[]). ThenodeIDsargument may only contain the node ID of the node the management client directs this method call at, and thereassignActivitiesToNodeIDsargument must be eithernullor an empty array (no reassignment will take place in either case). Any other combination of argument values will result in anInvalidArgumentExceptionbeing thrown.This method does not affect the default desired state of the SLEE.
This method has several modes of operation, depending on the value of the
reassignActivitiesToNodeIDsparameter:-
if
reassignActivitiesToNodeIDsisnull, this method behaves in the same way as thestop(int[])method, ie. no replicated activity reassignment takes place -
if
reassignActivitiesToNodeIDsis a zero-length array, replicated activities will be reassigned to any other cluster nodes that are capable of taking ownership of the activities; if no nodes satisfy this criteria no activity reassignment takes place -
if
reassignActivitiesToNodeIDsis an array with at least one element, replicated activities will be reassigned to the specified node(s).
Replicated activities for an individual resource adaptor entity will only be reassigned from a node if the node meets the following conditions:
-
the node is a live cluster member providing event routing functions, ie. not a quorum node
-
the resource adaptor entity has an actual state of
ResourceAdaptorEntityActualState.activeorResourceAdaptorEntityActualState.stoppingon the node -
the SLEE has an actual state of
SleeActualState.runningon the node prior to this method being invoked.
Replicated activities for an individual resource adaptor entity may only be reassigned to a node if the node meets the following conditions:
-
the node is a live cluster member providing event routing functions, ie. not a quorum node
-
the resource adaptor entity has both a desired state of
ResourceAdaptorEntityDesiredState.activeand an actual state ofResourceAdaptorEntityActualState.activeon the node -
the SLEE has an actual state of
SleeActualState.runningstate on the node.
- Parameters:
stopNodeIDs- the node IDs of the nodes to stop the SLEE event-routing functions on.reassignActivitiesToNodeIDs- the set of nodes to reassign replicated activities to.- Throws:
NullPointerException- ifstopNodeIDsisnull.InvalidArgumentException- ifstopNodeIDsis zero-length or contains invalid node IDs, ifreassignActivitiesToNodeIDsis non-null and contains invalid node IDs, or ifstopNodeIDsandreassignActivitiesToNodeIDshave a non-empty intersection.InvalidStateException- if the effective desired state of the SLEE is notSleeDesiredState.activeon all specified nodes.ManagementException- if the operational state of the SLEE could not be changed due to a system-level failure.
-
-
getState
SleeState getState() throws ManagementException
Get the current operational state of the SLEE. This method returns the state of the SLEE on the node the management client directs the method call at, as determined by
RhinoHousekeepingMBean.getNodeID().This method translates the actual state of the SLEE on the node to an equivalent JAIN SLEE-defined state.
- Specified by:
getStatein interfaceSleeManagementMBean- Returns:
- a
SleeStateobject that indicates the current operational state of the SLEE on the invoked node. - Throws:
ManagementException- if the operational state could not be determined due to a system-level failure.
-
getState
SleeState[] getState(int[] nodeIDs) throws NullPointerException, InvalidArgumentException, ManagementException
Get the current operational state of the SLEE on each of the specified nodes.
When using the savanna clustering mode, this method translates the desired or actual state of the SLEE on each specified node to an equivalent JAIN SLEE-defined state depending on the presence of the node. For nodes that are current live event router nodes, actual state is used. For nodes that are not cluster members or are not event router nodes, desired state is used.
When using the pool clustering mode, this method can only be used to query the state of the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(), and returns the equivalent JAIN SLEE-defined state for the actual state of the SLEE. Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To query state for another node, a client must connect directly with that node.- Parameters:
nodeIDs- the node IDs of the nodes to return the SLEE state for.- Returns:
- an array of SLEE state objects.
This array will be the same length as the supplied
nodeIDsarray, and ifstates = getState(nodeIDs)thenstates[i]equals the state of the SLEE on nodenodeIDs[i]. If there is no state information for the SLEE on a particular node,SleeState.STOPPEDis returned as the resulting state for the SLEE on that node. - Throws:
NullPointerException- ifnodeIDsisnull.InvalidArgumentException- ifnodeIDsis zero-length or contains invalid node IDs, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.ManagementException- if the operational state could not be determined due to a system-level failure.
-
getNodes
int[] getNodes(SleeState state) throws NullPointerException, ManagementException
Get the set of event-router nodes in the primary component that are in the specified SLEE state.
This method translates the actual state of the SLEE on each node to an equivalent JAIN SLEE-defined state for comparison purposes.
- Parameters:
state- the required state.- Returns:
- an array of node IDs identifying the event-router nodes that are in the specified state.
- Throws:
NullPointerException- ifstateisnull.ManagementException- if the set of nodes in the required state could not be determined due to a system-level failure.
-
shutdown
void shutdown() throws InvalidStateException, ManagementExceptionShutdown and terminate the cluster. All cluster nodes terminate in response to this request. The SLEE must have both an effective desired state of
SleeDesiredState.stoppedand an actual state ofSleeActualState.stoppedon all event-router nodes.This method will block for at most the default shutdown flush timeout period. If the timeout period is reached and all required in-memory database state has not yet been flushed to persistent storage, this method will throw a
ManagementException.This is a pre-Rhino-3.0.0 shutdown management API. It is recommended to use
shutdownCluster(false)instead.- Specified by:
shutdownin interfaceSleeManagementMBean- Throws:
InvalidStateException- if the SLEE is not currently in the correct state on all event-router nodes in the cluster.ManagementException- if the cluster could not be shut down due to a system-level failure, or if the default shutdown timeout period is reached without all required state having been persisted.
-
shutdown
void shutdown(boolean restart) throws InvalidStateException, ManagementExceptionShutdown and terminate the cluster. All cluster nodes terminate in response to this request. The SLEE must have both an effective desired state of
SleeDesiredState.stoppedand an actual state ofSleeActualState.stoppedon all event-router nodes.This method will block for at most the default shutdown flush timeout period. If the timeout period is reached and all required in-memory database state has not yet been flushed to persistent storage, this method will throw a
ManagementException.This is a pre-Rhino-3.0.0 shutdown management API. It is recommended to use
shutdownCluster(boolean)instead.- Parameters:
restart- flag indicating whether or not the the cluster nodes should be restarted after shutting them down.- Throws:
InvalidStateException- if the SLEE is not currently in the correct state on all event-router nodes in the cluster.ManagementException- if the cluster could not be shut down due to a system-level failure, or if the default shutdown timeout period is reached without all required state having been persisted.
-
shutdown
void shutdown(long timeout) throws InvalidStateException, ManagementExceptionShutdown and terminate the cluster. All cluster nodes terminate in response to this request. The SLEE must have both an effective desired state of
SleeDesiredState.stoppedand an actual state ofSleeActualState.stoppedon all event-router nodes.This method will block for at most the specified timeout period. If the timeout period is reached and all required in-memory database state has not yet been flushed to persistent storage, this method will throw a
ManagementException.This is a pre-Rhino-3.0.0 shutdown management API. It is recommended to use
shutdownCluster(timeout, false)instead.- Parameters:
timeout- the timeout period, measured in milliseconds, in which Rhino will attempt to flush outstanding in-memory database changes to persistent storage. A value less than or equal to 0 indicates an infinite timeout period.- Throws:
InvalidStateException- if the SLEE is not currently in the correct state on all event-router nodes in the cluster.ManagementException- if the cluster could not be shut down due to a system-level failure, or if the specified shutdown timeout period is reached without all required state having been persisted.
-
shutdown
void shutdown(long timeout, boolean restart) throws InvalidStateException, ManagementExceptionShutdown and terminate the cluster. All cluster nodes terminate in response to this request. The SLEE must have both an effective desired state of
SleeDesiredState.stoppedand an actual state ofSleeActualState.stoppedon all event-router nodes.This method will block for at most the specified timeout period. If the timeout period is reached and all required in-memory database state has not yet been flushed to persistent storage, this method will throw a
ManagementException.This is a pre-Rhino-3.0.0 shutdown management API. It is recommended to use
shutdownCluster(long, boolean)instead.- Parameters:
timeout- the timeout period, measured in milliseconds, in which Rhino will attempt to flush outstanding in-memory database changes to persistent storage. A value less than or equal to 0 indicates an infinite timeout period.restart- flag indicating whether or not the the cluster nodes should be restarted after shutting them down.- Throws:
InvalidStateException- if the SLEE is not currently in the correct state on all event-router nodes in the cluster.ManagementException- if the cluster could not be shut down due to a system-level failure, or if the specified shutdown timeout period is reached without all required state having been persisted.
-
shutdown
void shutdown(int[] nodeIDs) throws NullPointerException, InvalidArgumentException, InvalidStateException, ManagementExceptionShutdown and terminate the specified cluster nodes. The SLEE must have both an effective desired state of
SleeDesiredState.stoppedand an actual state ofSleeActualState.stoppedon all specified nodes.When using the pool clustering mode, this method can only be used to shut down the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(), Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To shut down another node, a client must connect directly with that node.This method will block for at most the default shutdown flush timeout period. If the timeout period is reached and all required in-memory database state has not yet been flushed to persistent storage, this method will throw a
ManagementException.This is a pre-Rhino-3.0.0 shutdown management API. It is recommended to use
shutdownNodes(nodeIDs, false)instead.- Parameters:
nodeIDs- the node IDs of the nodes to shut down.- Throws:
NullPointerException- ifnodeIDsisnull.InvalidArgumentException- ifnodeIDscontains invalid node IDs, contains the IDs of nodes that are not current cluster members, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.InvalidStateException- if the SLEE is not currently in the correct state on all event-router nodes specified innodeIDs.ManagementException- if the specified nodes could not be shut down due to a system-level failure, or if the default shutdown timeout period is reached without all required state having been persisted.
-
shutdown
void shutdown(int[] nodeIDs, boolean restart) throws NullPointerException, InvalidArgumentException, InvalidStateException, ManagementExceptionShutdown and terminate the specified cluster nodes. The SLEE must have both an effective desired state of
SleeDesiredState.stoppedand an actual state ofSleeActualState.stoppedon all specified nodes.When using the pool clustering mode, this method can only be used to shut down the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(), Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To shut down another node, a client must connect directly with that node.This method will block for at most the default shutdown flush timeout period. If the timeout period is reached and all required in-memory database state has not yet been flushed to persistent storage, this method will throw a
ManagementException.This is a pre-Rhino-3.0.0 shutdown management API. It is recommended to use
shutdownNodes(int[], boolean)instead.- Parameters:
nodeIDs- the node IDs of the nodes to shut down.restart- flag indicating whether or not the the cluster nodes should be restarted after shutting them down.- Throws:
NullPointerException- ifnodeIDsisnull.InvalidArgumentException- ifnodeIDscontains invalid node IDs, contains the IDs of nodes that are not current cluster members, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.InvalidStateException- if the SLEE is not currently in the correct state on all event-router nodes specified innodeIDs.ManagementException- if the specified nodes could not be shut down due to a system-level failure, or if the default shutdown timeout period is reached without all required state having been persisted.
-
shutdown
void shutdown(int[] nodeIDs, long timeout) throws NullPointerException, InvalidArgumentException, InvalidStateException, ManagementExceptionShutdown and terminate the specified cluster nodes. The SLEE must have both an effective desired state of
SleeDesiredState.stoppedand an actual state ofSleeActualState.stoppedon all specified nodes.When using the pool clustering mode, this method can only be used to shut down the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(), Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To shut down another node, a client must connect directly with that node.This method will block for at most the specified timeout period. If the timeout period is reached and all required in-memory database state has not yet been flushed to persistent storage, this method will throw a
ManagementException.This is a pre-Rhino-3.0.0 shutdown management API. It is recommended to use
shutdownNodes(nodeIDs, timeout, false)instead.- Parameters:
nodeIDs- the node IDs of the nodes to shut down.timeout- the timeout period, measured in milliseconds, in which Rhino will attempt to flush outstanding in-memory database changes to persistent storage. A value less than or equal to 0 indicates an infinite timeout period.- Throws:
NullPointerException- ifnodeIDsisnull.InvalidArgumentException- ifnodeIDscontains invalid node IDs, contains the IDs of nodes that are not current cluster members, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.InvalidStateException- if the SLEE is not currently in the correct state on all event-router nodes specified innodeIDs.ManagementException- if the specified nodes could not be shut down due to a system-level failure, or if the specified shutdown timeout period is reached without all required state having been persisted.
-
shutdown
void shutdown(int[] nodeIDs, long timeout, boolean restart) throws NullPointerException, InvalidArgumentException, InvalidStateException, ManagementExceptionShutdown and terminate the specified cluster nodes. The SLEE must have both an effective desired state of
SleeDesiredState.stoppedand an actual state ofSleeActualState.stoppedon all specified nodes.When using the pool clustering mode, this method can only be used to shut down the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(), Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To shut down another node, a client must connect directly with that node.This method will block for at most the specified timeout period. If the timeout period is reached and all required in-memory database state has not yet been flushed to persistent storage, this method will throw a
ManagementException.This is a pre-Rhino-3.0.0 shutdown management API. It is recommended to use
shutdownNodes(int[], long, boolean)instead.- Parameters:
nodeIDs- the node IDs of the nodes to shut down.timeout- the timeout period, measured in milliseconds, in which Rhino will attempt to flush outstanding in-memory database changes to persistent storage. A value less than or equal to 0 indicates an infinite timeout period.restart- flag indicating whether or not the the cluster nodes should be restarted after shutting them down.- Throws:
NullPointerException- ifnodeIDsisnull.InvalidArgumentException- ifnodeIDscontains invalid node IDs, contains the IDs of nodes that are not current cluster members, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.InvalidStateException- if the SLEE is not currently in the correct state on all event-router nodes specified innodeIDs.ManagementException- if the specified nodes could not be shut down due to a system-level failure, or if the specified shutdown timeout period is reached without all required state having been persisted.
-
reboot
@Deprecated(since="3.0.0") void reboot(int[] nodeIDs, SleeState[] rebootStates) throws NullPointerException, InvalidArgumentException, InvalidStateException, ManagementException
Deprecated.This method ignores the state of user-defined namespaces. It is recommended to useshutdownNodes(nodeIDs, true)instead.Reboot the specified nodes into the given states.
The length of the
rebootStatesarray must be either1or the same length as thenodeIDsarray. If the length is1, then the same reboot state is used for all nodes, otherwise the reboot state of the node specified bynode[i]is set torebootStates[i]. This method delegates toshutdown()to perform the restart. As such, the SLEE must be stopped before rebooting.When using the pool clustering mode, this method can only be used to reboot the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(), Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To reboot another node, a client must connect directly with that node.- Parameters:
nodeIDs- the node IDs of the nodes to shut down.rebootStates- the states to set the Slee to after rebooting (true forSleeState.RUNNING.- Throws:
NullPointerException- ifnodeIDsisnull.InvalidArgumentException- ifnodeIDscontains invalid node IDs, contains the IDs of nodes that are not current cluster members, if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID, or ifrebootStatesisnullor the length of therebootStatesarray is neither1nor the same as the length of thenodeIDsarray.InvalidStateException- if the SLEE is not currently in theSleeState.STOPPEDstate on all event-router nodes specified.ManagementException- if the operational state of the SLEE could not be changed due to a system-level failure.
-
reboot
@Deprecated(since="3.0.0") void reboot(SleeState[] rebootStates) throws InvalidArgumentException, InvalidStateException, ManagementException
Deprecated.This method ignores the state of user-defined namespaces. It is recommended to useshutdownCluster(true)instead.Reboot all cluster nodes into the given states.
The length of
rebootStatesmust be1and all cluster nodes will be set to the same specified reboot state. This method delegates toshutdown()to perform the restart. As such, the Slee must be stopped before rebooting.When using the pool clustering mode, this method will only reboot the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(), To reboot another node, a client must connect directly with that node.- Parameters:
rebootStates- the states to set the Slee to after rebooting (true forSleeState.RUNNING.- Throws:
InvalidArgumentException- ifrebootStatesisnullor has a length other than1.InvalidStateException- if the SLEE is not currently in theSleeState.STOPPEDstate on all event-router nodes.ManagementException- if the operational state of the SLEE could not be changed due to a system-level failure.
-
shutdownCluster
void shutdownCluster(boolean restart) throws InvalidStateException, ManagementExceptionInitiate a managed shutdown and termination, with optional restart, of all cluster nodes.
When using the pool clustering mode, this method will only shut down the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(), To shut down another node, a client must connect directly with that node.This method forces the actual state of the SLEE in all namespaces on event router nodes to transition towards
SleeActualState.stoppedwhere it is not already. When the SLEE in all namespaces on a node has reached this state, the node gracefully leaves the cluster and terminates. As quorum nodes have no activity state and thus are always idle, they are terminated immediately by this operation.Each node will wait for at most the default shutdown timeout period for the SLEE to reach the stopped state. If this timeout period is reached before that happens, node termination is initiated anyway and any outstanding activities may be lost.
Once a node reaches an idle state, or the shutdown timeout period is reached, the node will attempt to flush any outstanding in-memory database state and other relevant configuration to persistent storage before termination. Nodes use the default shutdown flush timeout period for this operation and will always be given at least that amount of time to flush, regardless of how much time remains of the default shutdown timeout period. This means that the actual maximum time period that can elapse before node termination occurs is the sum of the default shutdown timeout period plus the default shutdown flush timeout period.
If there are cluster nodes that are already shutting down when this method is invoked, they will be ignored by this method and will continue to shut down as originally instructed. Only the remaining nodes that aren’t already shutting down will be affected by the invocation.
If the
restartflag istrue, each node will automatically restart after termination.This method does not affect the desired state of the SLEE, any service, or any resource adaptor entity. If a node is restarted after termination, either manually or automatically, existing desired state will be retained and actual state will attempt to converge to desired state as normal.
This method is a non-blocking operation. It returns immediately after the shutdown request has been delivered to all cluster nodes.
- Parameters:
restart- boolean flag indicating whether or not nodes should automatically restart after termination.- Throws:
InvalidStateException- if all cluster nodes are already shutting down.ManagementException- if the shutdown could not be initiated due to a system-level failure.- Since:
- Rhino 3.0.0
-
shutdownCluster
void shutdownCluster(long timeout, boolean restart) throws InvalidStateException, ManagementExceptionInitiate a managed shutdown and termination, with optional restart, of all cluster nodes.
When using the pool clustering mode, this method will only shut down the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(), To shut down another node, a client must connect directly with that node.This method forces the actual state of the SLEE in all namespaces on event router nodes to transition towards
SleeActualState.stoppedwhere it is not already. When the SLEE in all namespaces on a node has reached this state, the node gracefully leaves the cluster and terminates. As quorum nodes have no activity state and thus are always idle, they are terminated immediately by this operation.Each node will wait for at most the specified shutdown timeout period for the SLEE to reach the stopped state. If this timeout period is reached before that happens, node termination is initiated anyway and any outstanding activities may be lost.
Once a node reaches an idle state, or the shutdown timeout period is reached, the node will attempt to flush any outstanding in-memory database state and other relevant configuration to persistent storage before termination. Nodes use the default shutdown flush timeout period for this operation and will always be given at least that amount of time to flush, regardless of how much time remains of the default shutdown timeout period. This means that the actual maximum time period that can elapse before node termination occurs is the sum of the default shutdown timeout period plus the default shutdown flush timeout period.
If there are cluster nodes that are already shutting down when this method is invoked, they will be ignored by this method and will continue to shut down as originally instructed. Only the remaining nodes that aren’t already shutting down will be affected by the invocation.
If the
restartflag istrue, each node will automatically restart after termination.This method does not affect the desired state of the SLEE, any service, or any resource adaptor entity. If a node is restarted after termination, either manually or automatically, existing desired state will be retained and actual state will attempt to converge to desired state as normal.
This method is a non-blocking operation. It returns immediately after the shutdown request has been delivered to all cluster nodes.
- Parameters:
timeout- the time period, measured in milliseconds, specifying the maximum duration nodes can wait for event processing functions to cease before termination is forced. A value less than or equal to0indicates an infinite timeout period.restart- boolean flag indicating whether or not nodes should automatically restart after termination.- Throws:
InvalidStateException- if all cluster nodes are already shutting down.ManagementException- if the shutdown could not be initiated due to a system-level failure.- Since:
- Rhino 3.0.0
-
shutdownNodes
void shutdownNodes(int[] nodeIDs, boolean restart) throws NullPointerException, InvalidArgumentException, InvalidStateException, ManagementExceptionInitiate a managed shutdown and termination, with optional restart, of the specified nodes.
When using the pool clustering mode, this method can only be used to shut down the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(), Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To shut down another node, a client must connect directly with that node.This method forces the actual state of the SLEE in all namespaces on event router nodes to transition towards
SleeActualState.stoppedwhere it is not already. When the SLEE in all namespaces on a node has reached this state, the node gracefully leaves the cluster and terminates. As quorum nodes have no activity state and thus are always idle, they are terminated immediately by this operation.Each node will wait for at most the default shutdown timeout period for the SLEE to reach the stopped state. If this timeout period is reached before that happens, node termination is initiated anyway and any outstanding activities may be lost.
Once a node reaches an idle state, or the shutdown timeout period is reached, the node will attempt to flush any outstanding in-memory database state and other relevant configuration to persistent storage before termination. Nodes use the default shutdown flush timeout period for this operation and will always be given at least that amount of time to flush, regardless of how much time remains of the default shutdown timeout period. This means that the actual maximum time period that can elapse before node termination occurs is the sum of the default shutdown timeout period plus the default shutdown flush timeout period.
If the
restartflag istrue, each node will automatically restart after termination.This method does not affect the desired state of the SLEE, any service, or any resource adaptor entity. If a node is restarted after termination, either manually or automatically, existing desired state will be retained and actual state will attempt to converge to desired state as normal.
This method is a non-blocking operation. It returns immediately after the shutdown request has been delivered to all specified nodes.
- Parameters:
nodeIDs- the node IDs of the nodes to shut down.restart- boolean flag indicating whether or not nodes should automatically restart after termination.- Throws:
NullPointerException- ifnodeIDsisnull.InvalidArgumentException- ifnodeIDsis zero length, contains invalid node IDs, contains duplicate node IDs, contains the IDs of nodes that are not current cluster members, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.InvalidStateException- if some specified nodes are already shutting down.ManagementException- if the shutdown could not be initiated due to a system-level failure.- Since:
- Rhino 3.0.0
-
shutdownNodes
void shutdownNodes(int[] nodeIDs, long timeout, boolean restart) throws NullPointerException, InvalidArgumentException, InvalidStateException, ManagementExceptionInitiate a managed shutdown and termination, with optional restart, of the specified nodes.
When using the pool clustering mode, this method can only be used to shut down the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(), Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To shut down another node, a client must connect directly with that node.This method forces the actual state of the SLEE in all namespaces on event router nodes to transition towards
SleeActualState.stoppedwhere it is not already. When the SLEE in all namespaces on a node has reached this state, the node gracefully leaves the cluster and terminates. As quorum nodes have no activity state and thus are always idle, they are terminated immediately by this operation.Each node will wait for at most the specified shutdown timeout period for the SLEE to reach the stopped state. If this timeout period is reached before that happens, node termination is initiated anyway and any outstanding activities may be lost.
Once a node reaches an idle state, or the shutdown timeout period is reached, the node will attempt to flush any outstanding in-memory database state and other relevant configuration to persistent storage before termination. Nodes use the default shutdown flush timeout period for this operation and will always be given at least that amount of time to flush, regardless of how much time remains of the default shutdown timeout period. This means that the actual maximum time period that can elapse before node termination occurs is the sum of the default shutdown timeout period plus the default shutdown flush timeout period.
If the
restartflag istrue, each node will automatically restart after termination.This method does not affect the desired state of the SLEE, any service, or any resource adaptor entity. If a node is restarted after termination, either manually or automatically, existing desired state will be retained and actual state will attempt to converge to desired state as normal.
This method is a non-blocking operation. It returns immediately after the shutdown request has been delivered to all specified nodes.
- Parameters:
timeout- the time period, measured in milliseconds, specifying the maximum duration nodes can wait for event processing functions to cease before termination is forced. A value less than or equal to0indicates an infinite timeout period.restart- boolean flag indicating whether or not nodes should automatically restart after termination.- Throws:
NullPointerException- ifnodeIDsisnull.InvalidArgumentException- ifnodeIDsis zero length, contains invalid node IDs, contains duplicate node IDs, contains the IDs of nodes that are not current cluster members, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.InvalidStateException- if some specified nodes are already shutting down.ManagementException- if the shutdown could not be initiated due to a system-level failure.- Since:
- Rhino 3.0.0
-
kill
void kill(int[] nodeIDs) throws NullPointerException, InvalidArgumentException, ManagementException
Forcefully terminate the specified nodes in the cluster. The nodes terminate immediately without grace.
When using the pool clustering mode, this method can only be used to terminate the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(), Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To terminate another node, a client must connect directly with that node.- Parameters:
nodeIDs- the node IDs of the nodes to shut down.- Throws:
NullPointerException- ifnodeIDsisnull.InvalidArgumentException- ifnodeIDsis zero length, contains invalid node IDs, contains duplicate node IDs, contains the IDs of nodes that are not current cluster members, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.ManagementException- if the operational state of the SLEE could not be changed due to a system-level failure.
-
getRhinoInspectorMBean
ObjectName getRhinoInspectorMBean() throws ManagementException
Get the JMX Object Name of the Rhino Inspector Housekeeping object.
- Returns:
- the Object Name of the
RhinoInspectorMBeanobject. - Throws:
ManagementException
-
getStatsManagementMBean
ObjectName getStatsManagementMBean() throws ManagementException
Get the JMX Object Name of the Stats Management object.
- Returns:
- the Object Name of the
StatsManagementMBeanobject. - Throws:
ManagementException
-
getContainerConfigurationMBean
ObjectName getContainerConfigurationMBean() throws ManagementException
Get the JMX Object Name of the Container Configuration Management object.
- Returns:
- the Object Name of the
ContainerConfigurationManagementMBeanobject. - Throws:
ManagementException
-
getNamespaceManagementMBean
ObjectName getNamespaceManagementMBean() throws ManagementException
Get the JMX Object Name of the Namespace Management object.
- Returns:
- the JMX Object Name of the
NamespaceManagementMBeanobject. - Throws:
ManagementException
-
getUserTransactionManagerMBean
ObjectName getUserTransactionManagerMBean() throws ManagementException
Get the JMX Object Name of the User Transaction Manager object.
- Returns:
- the JMX Object Name of the
UserTransactionManagerMBeanobject. - Throws:
ManagementException
-
getLimiterManagementMBean
ObjectName getLimiterManagementMBean() throws ManagementException
Get the JMX Object Name of the Limiter Manager object.
- Returns:
- the JMX Object Name of the
LimiterManagementMBeanobject. - Throws:
ManagementException
-
annotateLog
void annotateLog(String logKey, String logLevel, String message, Throwable throwable) throws ManagementException
Logs a message to all nodes in the cluster using Rhino’s logging subsystem.
- Parameters:
logKey- log key to log tologLevel- log level to log atmessage- the message to logthrowable- optional throwable to log (may be null)- Throws:
ManagementException
-
getUsageMBean
ObjectName getUsageMBean(String subsystemName) throws NullPointerException, UnrecognizedSubsystemException, InvalidArgumentException, ManagementException
- Specified by:
getUsageMBeanin interfaceSleeManagementMBean- Throws:
NullPointerExceptionUnrecognizedSubsystemExceptionInvalidArgumentExceptionManagementException
-
getUsageMBean
ObjectName getUsageMBean(String subsystemName, String paramSetName) throws NullPointerException, UnrecognizedSubsystemException, InvalidArgumentException, UnrecognizedUsageParameterSetNameException, ManagementException
-
getUsageNotificationManagerMBean
ObjectName getUsageNotificationManagerMBean(String subsystemName) throws NullPointerException, UnrecognizedSubsystemException, InvalidArgumentException, ManagementException
- Specified by:
getUsageNotificationManagerMBeanin interfaceSleeManagementMBean- Throws:
NullPointerExceptionUnrecognizedSubsystemExceptionInvalidArgumentExceptionManagementException
-
getUsageParameterSets
String[] getUsageParameterSets(String subsystemName) throws NullPointerException, UnrecognizedSubsystemException, InvalidArgumentException, ManagementException
- Specified by:
getUsageParameterSetsin interfaceSleeManagementMBean- Throws:
NullPointerExceptionUnrecognizedSubsystemExceptionInvalidArgumentExceptionManagementException
-
getDefaultDesiredState
SleeDesiredState getDefaultDesiredState() throws ManagementException
Get the current default desired state of the SLEE. The default desired state is used when no per-node SLEE state exists on a given node.
- Returns:
- the current default desired state of the SLEE.
- Throws:
ManagementException- if the desired state could not be determined due to a system-level failure.- Since:
- Rhino 3.0.0
-
setDefaultDesiredState
void setDefaultDesiredState(SleeDesiredState state) throws NullPointerException, ManagementException
Set the default desired state of the SLEE. The default desired state is used when no per-node SLEE state exists on a given node.
- Parameters:
state- the default desired state to set.- Throws:
NullPointerException- ifstateisnull.ManagementException- if the desired state could not be set due to a system-level failure.- Since:
- Rhino 3.0.0
-
getPerNodeDesiredState
SleeDesiredState getPerNodeDesiredState(int nodeID) throws InvalidArgumentException, ManagementException
Get the current per-node desired state of the SLEE on the specified node.
If per-node state exists for the SLEE on the target node then the state contained therein is returned, otherwise
nullis returned instead.When using the pool clustering mode, the
nodeIDargument must be equal to the node ID of the node the management client directs this method call at, as determined byRhinoHousekeepingMBean.getNodeID(). To query state for another node, a client must connect directly with that node.- Returns:
- the current desired state of the SLEE on the specified node.
- Throws:
InvalidArgumentException- ifnodeIDis an invalid node ID, or if the pool clustering mode is being used andnodeIDis not equal to this node’s ID.ManagementException- if the desired state could not be set due to a system-level failure.- Since:
- Rhino 3.0.0
-
getPerNodeDesiredState
SleeDesiredState[] getPerNodeDesiredState(int[] nodeIDs) throws NullPointerException, InvalidArgumentException, ManagementException
Get the current per-node desired state of the SLEE for each of the specified nodes.
When using the pool clustering mode, this method can only be used to query the state of the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(). Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To query state for another node, a client must connect directly with that node.- Parameters:
nodeIDs- the node IDs of the nodes to return the SLEE’s per-node desired state for.- Returns:
- an array of SLEE desired state objects.
This array will be the same length as the supplied
nodeIDsarray, and ifstates = getPerNodeDesiredState(nodeIDs)thenstates[i]equals the per-node desired state of the SLEE on nodenodeIDs[i]. If there is no state information for the SLEE on a particular node, thennullstate is returned as the resulting state for the SLEE on that node. - Throws:
NullPointerException- ifnodeIDsisnull.InvalidArgumentException- ifnodeIDsis zero-length or contains invalid node IDs, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.ManagementException- if the desired state could not be determined due to a system-level failure.- Since:
- Rhino 3.0.0
-
getNodesWithDesiredState
int[] getNodesWithDesiredState() throws ManagementExceptionGet the set of node IDs where per-node desired state exists for the SLEE. This set may include nodes which are not currently part of the cluster.
- Returns:
- an array of node IDs.
- Throws:
ManagementException- if the set of node IDs could could not be determined due to a system-level failure.- Since:
- Rhino 3.0.0
-
getActualState
SleeActualState[] getActualState(int[] nodeIDs) throws NullPointerException, InvalidArgumentException, ManagementException
Get the current actual state of the SLEE for each of the specified nodes.
When using the pool clustering mode, this method can only be used to query the state of the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(). Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To query state for another node, a client must connect directly with that node.- Parameters:
nodeIDs- the node IDs of the nodes to return the actual SLEE state for.- Returns:
- an array of SLEE actual state objects.
This array will be the same length as the supplied
nodeIDsarray, and ifstates = getActualState(nodeIDs)thenstates[i]equals the actual state of the SLEE on nodenodeIDs[i]. If there is no state information for the SLEE on a particular node, thennullis returned as the resulting state for the SLEE on that node. - Throws:
NullPointerException- ifnodeIDsisnull.InvalidArgumentException- ifnodeIDsis zero-length or contains invalid node IDs, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.ManagementException- if the actual state could not be determined due to a system-level failure.- Since:
- Rhino 3.0.0
-
setPerNodeDesiredState
void setPerNodeDesiredState(int[] nodeIDs, SleeDesiredState state) throws NullPointerException, InvalidArgumentException, ManagementExceptionSet the per-node desired state of the SLEE on each of the specified nodes.
When using the pool clustering mode, this method can only be used to affect the state of the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(). Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To manage state for another node in pool mode, a client must connect directly with that node.- Parameters:
nodeIDs- an array of node IDs.state- the desired state to set.- Throws:
NullPointerException- if either argumentnull.InvalidArgumentException- ifnodeIDsis zero-length or contains invalid node IDs, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.ManagementException- if the desired state could not be set due to a system-level failure.- Since:
- Rhino 3.0.0
-
removePerNodeDesiredState
void removePerNodeDesiredState(int[] nodeIDs) throws InvalidArgumentException, ManagementException, NullPointerExceptionRemove the per-node desired state of the SLEE on each of the specified node(s). This will revert the desired state of the SLEE on each specified node to the current default desired state.
This method does nothing for any specified node that does not currently contain any per-node desired state for the SLEE.
- Parameters:
nodeIDs- an array of node IDs.- Throws:
NullPointerException- ifnodeIDsisnull.InvalidArgumentException- ifnodeIDscontains an invalid node ID.ManagementException- if the per-node desired state of the SLEE could not be removed due to a system-level failure.- Since:
- Rhino 3.0.0
-
-