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.

    • Method Detail

      • 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 to SleeDesiredState.running. Before this method returns, an attempt is then made to transition the SLEE to an actual state of SleeActualState.running on all specified nodes that are current live event router nodes where the actual state is SleeActualState.stopped. Any node where the SLEE actual state is SleeActualState.stopping will wait (asynchronously) until the SLEE reaches the SleeActualState.stopped state and then attempt to transition the SLEE back to SleeActualState.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 the nodeIDs argument will result in an InvalidArgumentException being 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 - if nodeIDs is null.
        InvalidArgumentException - if nodeIDs is zero-length or contains invalid node IDs, or if the pool clustering mode is being used and nodeIDs contains node IDs other than this node’s ID.
        InvalidStateException - if the effective desired state of the SLEE is not SleeDesiredState.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 by RhinoHousekeepingMBean.getEventRouterNodes(). All per-node desired state for the SLEE is removed by this method and the default desired state of the SLEE is set to SleeDesiredState.stopped (if it is not already). The SLEE then transitions to an actual state of SleeActualState.stopping on all event router nodes where the actual state is currently SleeActualState.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 interface SleeManagementMBean
        Throws:
        InvalidStateException - if the effective desired state of the SLEE is not SleeDesiredState.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 to SleeDesiredState.stopped. The SLEE then transitions to an actual state of SleeActualState.stopping on all specified nodes that are current live event router nodes where the actual state is SleeActualState.running before 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 the nodeIDs argument will result in an InvalidArgumentException being 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.stopped state quicker then stop(int[], int[]) should be used instead. Alternatively replicated activities may be reassigned for individual resource adaptor entities using the ResourceManagementMBean.reassignActivities(String, int[], int[]) method.

        Parameters:
        nodeIDs - the node IDs of the nodes to stop the SLEE event-routing functions on.
        Throws:
        NullPointerException - if nodeIDs is null.
        InvalidArgumentException - if nodeIDs is zero-length or contains invalid node IDs, or if the pool clustering mode is being used and nodeIDs contains node IDs other than this node’s ID.
        InvalidStateException - if the effective desired state of the SLEE is not SleeDesiredState.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 to SleeDesiredState.stopped. The SLEE then transitions to an actual state of SleeActualState.stopping on all specified nodes that are current live event router nodes where the actual state is SleeActualState.running before 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[]). The nodeIDs argument may only contain the node ID of the node the management client directs this method call at, and the reassignActivitiesToNodeIDs argument must be either null or an empty array (no reassignment will take place in either case). Any other combination of argument values will result in an InvalidArgumentException being 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 reassignActivitiesToNodeIDs parameter:

        • if reassignActivitiesToNodeIDs is null, this method behaves in the same way as the stop(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:

        Replicated activities for an individual resource adaptor entity may only be reassigned to a node if the node meets the following conditions:

        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 - if stopNodeIDs is null.
        InvalidArgumentException - if stopNodeIDs is zero-length or contains invalid node IDs, if reassignActivitiesToNodeIDs is non-null and contains invalid node IDs, or if stopNodeIDs and reassignActivitiesToNodeIDs have a non-empty intersection.
        InvalidStateException - if the effective desired state of the SLEE is not SleeDesiredState.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 interface SleeManagementMBean
        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.

        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 the nodeIDs argument will result in an InvalidArgumentException being 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 nodeIDs array, and if states = getState(nodeIDs) then states[i] equals the state of the SLEE on node nodeIDs[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 - if nodeIDs is null.
        InvalidArgumentException - if nodeIDs is zero-length or contains invalid node IDs, or if the pool clustering mode is being used and nodeIDs contains 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 - if state is null.
        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 of SleeActualState.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 interface SleeManagementMBean
        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 of SleeActualState.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 of SleeActualState.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 of SleeActualState.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 of SleeActualState.stopped on 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 the nodeIDs argument will result in an InvalidArgumentException being 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 - if nodeIDs is null.
        InvalidArgumentException - if nodeIDs contains invalid node IDs, contains the IDs of nodes that are not current cluster members, or if the pool clustering mode is being used and nodeIDs contains 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 in nodeIDs.
        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 of SleeActualState.stopped on 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 the nodeIDs argument will result in an InvalidArgumentException being 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 - if nodeIDs is null.
        InvalidArgumentException - if nodeIDs contains invalid node IDs, contains the IDs of nodes that are not current cluster members, or if the pool clustering mode is being used and nodeIDs contains 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 in nodeIDs.
        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 of SleeActualState.stopped on 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 the nodeIDs argument will result in an InvalidArgumentException being 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 - if nodeIDs is null.
        InvalidArgumentException - if nodeIDs contains invalid node IDs, contains the IDs of nodes that are not current cluster members, or if the pool clustering mode is being used and nodeIDs contains 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 in nodeIDs.
        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 of SleeActualState.stopped on 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 the nodeIDs argument will result in an InvalidArgumentException being 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 - if nodeIDs is null.
        InvalidArgumentException - if nodeIDs contains invalid node IDs, contains the IDs of nodes that are not current cluster members, or if the pool clustering mode is being used and nodeIDs contains 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 in nodeIDs.
        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 use shutdownNodes(nodeIDs, true) instead.

        Reboot the specified nodes into the given states.

        The length of the rebootStates array must be either 1 or the same length as the nodeIDs array. If the length is 1, then the same reboot state is used for all nodes, otherwise the reboot state of the node specified by node[i] is set to rebootStates[i]. This method delegates to shutdown() 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 the nodeIDs argument will result in an InvalidArgumentException being 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 for SleeState.RUNNING.
        Throws:
        NullPointerException - if nodeIDs is null.
        InvalidArgumentException - if nodeIDs contains invalid node IDs, contains the IDs of nodes that are not current cluster members, if the pool clustering mode is being used and nodeIDs contains node IDs other than this node’s ID, or if rebootStates is null or the length of the rebootStates array is neither 1 nor the same as the length of the nodeIDs array.
        InvalidStateException - if the SLEE is not currently in the SleeState.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.

        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.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 is true, 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.

        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.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 is true, 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 to 0 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.

        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 the nodeIDs argument will result in an InvalidArgumentException being 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.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 is true, 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 - if nodeIDs is null.
        InvalidArgumentException - if nodeIDs is 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 and nodeIDs contains 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,
                           ManagementException

        Initiate 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 the nodeIDs argument will result in an InvalidArgumentException being 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.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 is true, 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 to 0 indicates an infinite timeout period.
        restart - boolean flag indicating whether or not nodes should automatically restart after termination.
        Throws:
        NullPointerException - if nodeIDs is null.
        InvalidArgumentException - if nodeIDs is 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 and nodeIDs contains 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 the nodeIDs argument will result in an InvalidArgumentException being 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 - if nodeIDs is null.
        InvalidArgumentException - if nodeIDs is 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 and nodeIDs contains 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 RhinoInspectorMBean 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 to
        logLevel - log level to log at
        message - the message to log
        throwable - optional throwable to log (may be null)
        Throws:
        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 - if state is null.
        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.

        When using the pool clustering mode, the nodeID argument must be equal to the node ID of the node the management client directs this method call at, as determined by RhinoHousekeepingMBean.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 - if nodeID is an invalid node ID, or if the pool clustering mode is being used and nodeID is 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 the nodeIDs argument will result in an InvalidArgumentException being 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 nodeIDs array, and if states = getPerNodeDesiredState(nodeIDs) then states[i] equals the per-node desired state of the SLEE on node nodeIDs[i]. If there is no state information for the SLEE on a particular node, then null state is returned as the resulting state for the SLEE on that node.
        Throws:
        NullPointerException - if nodeIDs is null.
        InvalidArgumentException - if nodeIDs is zero-length or contains invalid node IDs, or if the pool clustering mode is being used and nodeIDs contains 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 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.

        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 the nodeIDs argument will result in an InvalidArgumentException being 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 nodeIDs array, and if states = getActualState(nodeIDs) then states[i] equals the actual state of the SLEE on node nodeIDs[i]. If there is no state information for the SLEE on a particular node, then null is returned as the resulting state for the SLEE on that node.
        Throws:
        NullPointerException - if nodeIDs is null.
        InvalidArgumentException - if nodeIDs is zero-length or contains invalid node IDs, or if the pool clustering mode is being used and nodeIDs contains 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,
                                    ManagementException

        Set 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 the nodeIDs argument will result in an InvalidArgumentException being 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 argument null.
        InvalidArgumentException - if nodeIDs is zero-length or contains invalid node IDs, or if the pool clustering mode is being used and nodeIDs contains 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,
                                       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 - if nodeIDs is null.
        InvalidArgumentException - if nodeIDs 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