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
SleeManagementMBean
for 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 void
annotateLog(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.ObjectName
getContainerConfigurationMBean()
Get the JMX Object Name of the Container Configuration Management object.SleeDesiredState
getDefaultDesiredState()
Get the current default desired state of the SLEE.ObjectName
getLimiterManagementMBean()
Get the JMX Object Name of the Limiter Manager object.ObjectName
getNamespaceManagementMBean()
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.SleeDesiredState
getPerNodeDesiredState(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.ObjectName
getRhinoInspectorMBean()
Get the JMX Object Name of the Rhino Inspector Housekeeping object.SleeState
getState()
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.ObjectName
getStatsManagementMBean()
Get the JMX Object Name of the Stats Management object.ObjectName
getUsageMBean(String subsystemName)
ObjectName
getUsageMBean(String subsystemName, String paramSetName)
ObjectName
getUsageNotificationManagerMBean(String subsystemName)
String[]
getUsageParameterSets(String subsystemName)
ObjectName
getUserTransactionManagerMBean()
Get the JMX Object Name of the User Transaction Manager object.void
kill(int[] nodeIDs)
Forcefully terminate the specified nodes in the cluster.void
reboot(int[] nodeIDs, SleeState[] rebootStates)
Deprecated.This method ignores the state of user-defined namespaces.void
reboot(SleeState[] rebootStates)
Deprecated.This method ignores the state of user-defined namespaces.void
removePerNodeDesiredState(int[] nodeIDs)
Remove the per-node desired state of the SLEE on each of the specified node(s).void
setDefaultDesiredState(SleeDesiredState state)
Set the default desired state of the SLEE.void
setPerNodeDesiredState(int[] nodeIDs, SleeDesiredState state)
Set the per-node desired state of the SLEE on each of the specified nodes.void
shutdown()
Shutdown and terminate the cluster.void
shutdown(boolean restart)
Shutdown and terminate the cluster.void
shutdown(int[] nodeIDs)
Shutdown and terminate the specified cluster nodes.void
shutdown(int[] nodeIDs, boolean restart)
Shutdown and terminate the specified cluster nodes.void
shutdown(int[] nodeIDs, long timeout)
Shutdown and terminate the specified cluster nodes.void
shutdown(int[] nodeIDs, long timeout, boolean restart)
Shutdown and terminate the specified cluster nodes.void
shutdown(long timeout)
Shutdown and terminate the cluster.void
shutdown(long timeout, boolean restart)
Shutdown and terminate the cluster.void
shutdownCluster(boolean restart)
Initiate a managed shutdown and termination, with optional restart, of all cluster nodes.void
shutdownCluster(long timeout, boolean restart)
Initiate a managed shutdown and termination, with optional restart, of all cluster nodes.void
shutdownNodes(int[] nodeIDs, boolean restart)
Initiate a managed shutdown and termination, with optional restart, of the specified nodes.void
shutdownNodes(int[] nodeIDs, long timeout, boolean restart)
Initiate a managed shutdown and termination, with optional restart, of the specified nodes.void
start()
Start the SLEE’s event routing subsystem on all nodes.void
start(int[] nodeIDs)
Start the SLEE’s event routing subsystem on the specified nodes.void
stop()
Stop the SLEE’s event routing subsystem on all nodes.void
stop(int[] nodeIDs)
Stop the SLEE’s event routing subsystem on the specified nodes.void
stop(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, ManagementException
Start the SLEE’s event routing subsystem on all nodes.
The SLEE must currently have an effective desired state of
SleeDesiredState.stopped
on 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.running
on all event router nodes where the actual state is currentlySleeActualState.stopped
. Any node where the SLEE actual state isSleeActualState.stopping
will wait (asynchronously) until the SLEE reaches theSleeActualState.stopped
state 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:
start
in interfaceSleeManagementMBean
- Throws:
InvalidStateException
- if the effective desired state of the SLEE is notSleeDesiredState.stopped
on 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, ManagementException
Start the SLEE’s event routing subsystem on the specified nodes.
The SLEE must currently have an effective desired state of
SleeDesiredState.stopped
on 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.running
on all specified nodes that are current live event router nodes where the actual state isSleeActualState.stopped
. Any node where the SLEE actual state isSleeActualState.stopping
will wait (asynchronously) until the SLEE reaches theSleeActualState.stopped
state and then attempt to transition the SLEE back toSleeActualState.running
.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.
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
- ifnodeIDs
isnull
.InvalidArgumentException
- ifnodeIDs
is zero-length or contains invalid node IDs.InvalidStateException
- if the SLEE is not currently in theSleeState.STOPPED
state on the specified nodes.InvalidStateException
- if the effective desired state of the SLEE is notSleeDesiredState.stopped
on 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.running
on 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.stopping
on all event router nodes where the actual state is currentlySleeActualState.running
before 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:
stop
in interfaceSleeManagementMBean
- Throws:
InvalidStateException
- if the effective desired state of the SLEE is notSleeDesiredState.running
on 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.running
on 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.stopping
on all specified nodes that are current live event router nodes where the actual state isSleeActualState.running
before this method returns.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.
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.stopped
state 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
- ifnodeIDs
isnull
.InvalidArgumentException
- ifnodeIDs
is zero-length or contains invalid node IDs.InvalidStateException
- if the effective desired state of the SLEE is notSleeDesiredState.running
on 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, ManagementException
Stop the SLEE’s event routing subsystem on the specified nodes.
The SLEE must currently have an effective desired state of
SleeDesiredState.running
on 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.stopping
on all specified nodes that are current live event router nodes where the actual state isSleeActualState.running
before this method returns.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.
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
reassignActivitiesToNodeIDs
parameter:-
if
reassignActivitiesToNodeIDs
isnull
, this method behaves in the same way as thestop(int[])
method, ie. no replicated activity reassignment takes place -
if
reassignActivitiesToNodeIDs
is 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
reassignActivitiesToNodeIDs
is 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.active
orResourceAdaptorEntityActualState.stopping
on the node -
the SLEE has an actual state of
SleeActualState.running
on 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.active
and an actual state ofResourceAdaptorEntityActualState.active
on the node -
the SLEE has an actual state of
SleeActualState.running
state 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
- ifstopNodeIDs
isnull
.InvalidArgumentException
- ifstopNodeIDs
is zero-length or contains invalid node IDs, ifreassignActivitiesToNodeIDs
is non-null and contains invalid node IDs, or ifstopNodeIDs
andreassignActivitiesToNodeIDs
have a non-empty intersection.InvalidStateException
- if the effective desired state of the SLEE is notSleeDesiredState.active
on 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:
getState
in interfaceSleeManagementMBean
- Returns:
- a
SleeState
object 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.
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.
- 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
nodeIDs
array, 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.STOPPED
is returned as the resulting state for the SLEE on that node. - Throws:
NullPointerException
- ifnodeIDs
isnull
.InvalidArgumentException
- ifnodeIDs
contains invalid node IDs.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
- ifstate
isnull
.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, ManagementException
Shutdown and terminate the cluster. All cluster nodes terminate in response to this request. The SLEE must have both an effective desired state of
SleeDesiredState.stopped
and an actual state ofSleeActualState.stopped
on 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:
shutdown
in 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, ManagementException
Shutdown and terminate the cluster. All cluster nodes terminate in response to this request. The SLEE must have both an effective desired state of
SleeDesiredState.stopped
and an actual state ofSleeActualState.stopped
on 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, ManagementException
Shutdown and terminate the cluster. All cluster nodes terminate in response to this request. The SLEE must have both an effective desired state of
SleeDesiredState.stopped
and an actual state ofSleeActualState.stopped
on 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, ManagementException
Shutdown and terminate the cluster. All cluster nodes terminate in response to this request. The SLEE must have both an effective desired state of
SleeDesiredState.stopped
and an actual state ofSleeActualState.stopped
on 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, ManagementException
Shutdown and terminate the specified cluster nodes. The SLEE must have both an effective desired state of
SleeDesiredState.stopped
and an actual state ofSleeActualState.stopped
on all specified 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
shutdownNodes(nodeIDs, false)
instead.- Parameters:
nodeIDs
- the node IDs of the nodes to shut down.- Throws:
NullPointerException
- ifnodeIDs
isnull
.InvalidArgumentException
- ifnodeIDs
contains invalid node IDs or contains the IDs of nodes that are not current cluster members.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, ManagementException
Shutdown and terminate the specified cluster nodes. The SLEE must have both an effective desired state of
SleeDesiredState.stopped
and an actual state ofSleeActualState.stopped
on all specified 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
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
- ifnodeIDs
isnull
.InvalidArgumentException
- ifnodeIDs
contains invalid node IDs or contains the IDs of nodes that are not current cluster members.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, ManagementException
Shutdown and terminate the specified cluster nodes. The SLEE must have both an effective desired state of
SleeDesiredState.stopped
and an actual state ofSleeActualState.stopped
on all specified 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
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
- ifnodeIDs
isnull
.InvalidArgumentException
- ifnodeIDs
contains invalid node IDs or contains the IDs of nodes that are not current cluster members.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, ManagementException
Shutdown and terminate the specified cluster nodes. The SLEE must have both an effective desired state of
SleeDesiredState.stopped
and an actual state ofSleeActualState.stopped
on all specified 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
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
- ifnodeIDs
isnull
.InvalidArgumentException
- ifnodeIDs
contains invalid node IDs or contains the IDs of nodes that are not current cluster members.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 given nodeID’s into given states. Array orders must match. This method delegates to
shutdown()
to perform the restart. As such, the SLEE must be stopped before rebooting.- 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
- ifnodeIDs
isnull
.InvalidArgumentException
- ifnodeIDs
contains invalid node IDs or contains the IDs of nodes that are not current cluster members. Also if rebootStates length differs from nodeIDs length.InvalidStateException
- if the SLEE is not currently in theSleeState.STOPPED
state 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. This method delegates to
shutdown()
to perform the restart. As such, the Slee must be stopped before rebooting.- Parameters:
rebootStates
- the states to set the Slee to after rebooting (true forSleeState.RUNNING
.- Throws:
InvalidArgumentException
- ifrebootStates
length differs from number of event router nodes.InvalidStateException
- if the SLEE is not currently in theSleeState.STOPPED
state on all event-router nodes specified.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, ManagementException
Initiate a managed shutdown and termination, with optional restart, of all cluster nodes.
This method forces the actual state of the SLEE in all namespaces on event router nodes to transition towards
SleeActualState.stopped
where 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
restart
flag 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, ManagementException
Initiate a managed shutdown and termination, with optional restart, of all cluster nodes.
This method forces the actual state of the SLEE in all namespaces on event router nodes to transition towards
SleeActualState.stopped
where 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
restart
flag 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 to0
indicates 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, ManagementException
Initiate a managed shutdown and termination, with optional restart, of the specified nodes.
This method forces the actual state of the SLEE in all namespaces on event router nodes to transition towards
SleeActualState.stopped
where 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
restart
flag 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
- ifnodeIDs
isnull
.InvalidArgumentException
- ifnodeIDs
is zero length, contains invalid node IDs, contains duplicate node IDs, or contains the IDs of nodes that are not current cluster members.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, ManagementException
Initiate a managed shutdown and termination, with optional restart, of the specified nodes.
This method forces the actual state of the SLEE in all namespaces on event router nodes to transition towards
SleeActualState.stopped
where 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
restart
flag 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 to0
indicates an infinite timeout period.restart
- boolean flag indicating whether or not nodes should automatically restart after termination.- Throws:
NullPointerException
- ifnodeIDs
isnull
.InvalidArgumentException
- ifnodeIDs
is zero length, contains invalid node IDs, contains duplicate node IDs, or contains the IDs of nodes that are not current cluster members.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.
- Parameters:
nodeIDs
- the node IDs of the nodes to shut down.- Throws:
NullPointerException
- ifnodeIDs
isnull
.InvalidArgumentException
- ifnodeIDs
contains invalid node IDsManagementException
- 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
RhinoInspectorMBean
object. - Throws:
ManagementException
-
getStatsManagementMBean
ObjectName getStatsManagementMBean() throws ManagementException
Get the JMX Object Name of the Stats Management object.
- Returns:
- the Object Name of the
StatsManagementMBean
object. - Throws:
ManagementException
-
getContainerConfigurationMBean
ObjectName getContainerConfigurationMBean() throws ManagementException
Get the JMX Object Name of the Container Configuration Management object.
- Returns:
- the Object Name of the
ContainerConfigurationManagementMBean
object. - Throws:
ManagementException
-
getNamespaceManagementMBean
ObjectName getNamespaceManagementMBean() throws ManagementException
Get the JMX Object Name of the Namespace Management object.
- Returns:
- the JMX Object Name of the
NamespaceManagementMBean
object. - 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
UserTransactionManagerMBean
object. - Throws:
ManagementException
-
getLimiterManagementMBean
ObjectName getLimiterManagementMBean() throws ManagementException
Get the JMX Object Name of the Limiter Manager object.
- Returns:
- the JMX Object Name of the
LimiterManagementMBean
object. - 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:
getUsageMBean
in interfaceSleeManagementMBean
- Throws:
NullPointerException
UnrecognizedSubsystemException
InvalidArgumentException
ManagementException
-
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:
getUsageNotificationManagerMBean
in interfaceSleeManagementMBean
- Throws:
NullPointerException
UnrecognizedSubsystemException
InvalidArgumentException
ManagementException
-
getUsageParameterSets
String[] getUsageParameterSets(String subsystemName) throws NullPointerException, UnrecognizedSubsystemException, InvalidArgumentException, ManagementException
- Specified by:
getUsageParameterSets
in interfaceSleeManagementMBean
- Throws:
NullPointerException
UnrecognizedSubsystemException
InvalidArgumentException
ManagementException
-
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
- ifstate
isnull
.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
null
is returned instead.- Returns:
- the current desired state of the SLEE on the specified node.
- Throws:
InvalidArgumentException
- ifnodeID
is an invalid node 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.
- 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
nodeIDs
array, 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, thennull
state is returned as the resulting state for the SLEE on that node. - Throws:
NullPointerException
- ifnodeIDs
isnull
.InvalidArgumentException
- ifnodeIDs
contains invalid node IDs.ManagementException
- if the desired state could not be determined due to a system-level failure.- Since:
- Rhino 3.0.0
-
getNodesWithDesiredState
int[] getNodesWithDesiredState() throws ManagementException
Get 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.
- 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
nodeIDs
array, 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, thennull
is returned as the resulting state for the SLEE on that node. - Throws:
NullPointerException
- ifnodeIDs
isnull
.InvalidArgumentException
- ifnodeIDs
contains invalid node IDs.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, ManagementException
Set the per-node desired state of the SLEE on each of the specified nodes.
- Parameters:
nodeIDs
- an array of node IDs.state
- the desired state to set.- Throws:
NullPointerException
- if either argumentnull
.InvalidArgumentException
- ifnodeIDs
contains an invalid node 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, NullPointerException
Remove 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
- ifnodeIDs
isnull
.InvalidArgumentException
- ifnodeIDs
contains 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
-
-