Interface ServiceManagementMBean
-
- All Superinterfaces:
ServiceManagementMBean
public interface ServiceManagementMBean extends ServiceManagementMBean
The
ServiceManagementMBeaninterface defines Service-related management operations. This interface provides extensions toServiceManagementMBeanfor additional Rhino-specific functionality.
-
-
Field Summary
-
Fields inherited from interface javax.slee.management.ServiceManagementMBean
OBJECT_NAME, SERVICE_STATE_CHANGE_NOTIFICATION_TYPE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidactivate(ServiceID id)Activate a Service on all nodes.voidactivate(ServiceID[] ids)Activate a set of Services on all nodes.voidactivate(ServiceID[] ids, int[] nodeIDs)Activate a set of Services on the specified nodes.voidactivate(ServiceID id, int[] nodeIDs)Activate a Service on the specified nodes.BindingResultaddBinding(ServiceID id, BindingDescriptorID bindingDescriptor, Map<ComponentID,ComponentID> componentMappings, boolean dryrun)Add a binding to a Service.BindingResultaddBindings(ServiceID id, BindingDescriptorID[] bindingDescriptors, Map<ComponentID,ComponentID> componentMappings, boolean dryrun)Add one or more bindings to a Service.voiddeactivate(ServiceID id)Deactivate a Service on all nodes.voiddeactivate(ServiceID[] ids)Deactivate a set of Services on all nodes.voiddeactivate(ServiceID[] ids, int[] nodeIDs)Deactivate a set of Services on the specified nodes.voiddeactivate(ServiceID id, int[] nodeIDs)Deactivate a Service on the specified nodes.voiddeactivateAndActivate(ServiceID[] deactivateIDs, ServiceID[] activateIDs)Deactivate one set of Services and activate another set of Services on all nodes.voiddeactivateAndActivate(ServiceID[] deactivateIDs, ServiceID[] activateIDs, int[] nodeIDs)Deactivate one set of Services and activate another set of Services on the specified nodes.voiddeactivateAndActivate(ServiceID deactivateID, ServiceID activateID)Deactivate a Service and activate another Service on all nodes.voiddeactivateAndActivate(ServiceID deactivateID, ServiceID activateID, int[] nodeIDs)Deactivate a Service and activate another Service on the specified nodes.ServiceActualState[]getActualState(ServiceID id, int[] nodeIDs)Get the current actual state of a Service for each of the specified nodes.BindingDescriptorID[]getBindings(ServiceID id)Get the set of binding descriptors currently associated with a Service.ServiceDesiredStategetDefaultDesiredState(ServiceID id)Get the current default desired state of a Service.booleangetDefaultInitialPersistenceEnabled(ServiceID id)Get the default initial persistence enabled status for a Service as specified in its descriptor.InitialPersistencegetInitialPersistence(ServiceID id)Get the initial persistence status for a Service.int[]getNodes(ServiceID id, ServiceState state)Get the set of event-router nodes in the primary component where the Service is in the specified state.int[]getNodesWithDesiredState(ServiceID id)Get the set of node IDs where per-node desired state exists for the specified Service.ServiceDesiredStategetPerNodeDesiredState(ServiceID id, int nodeID)Get the current per-node desired state of a Service on the specified node.ServiceDesiredState[]getPerNodeDesiredState(ServiceID id, int[] nodeIDs)Get the current per-node desired state of a Service for each of the specified nodes.ReplicationSelector[]getReplicationSelectors(ServiceID id)Get the current replication selectors for a Service.ReplicationSelector[][]getReplicationSelectors(ServiceID[] services)Get an array of the replication selectors corresponding to an array of Service component identifiers.booleangetServiceMetricsRecordingEnabled(ServiceID service)Determine if the recording of metrics for a Service is currently enabled or disabled.ServiceID[]getServices(ServiceState state)Get the set of Services that are in a particular state.ServiceID[]getServices(ServiceState state, int nodeID)Get the set of Services that are in a particular state on the specified node.ObjectNamegetServiceUsageMBean(ServiceID id)Byte[]getStartingPriorities(ServiceID[] services)Get an array of starting priorities corresponding to an array of Service component identifiers.bytegetStartingPriority(ServiceID service)Get the starting priority for a Service.ServiceStategetState(ServiceID id)Get the current state of a Service.ServiceState[]getState(ServiceID id, int[] nodeIDs)Get the current state of a Service on each of the specified nodes.Byte[]getStoppingPriorities(ServiceID[] services)Get an array of stopping priorities corresponding to an array of Service component identifiers.bytegetStoppingPriority(ServiceID service)Get the stopping priority for a Service.BindingResultremoveBinding(ServiceID id, BindingDescriptorID bindingDescriptor, boolean dryrun)Remove an existing binding from a Service.BindingResultremoveBindings(ServiceID id, BindingDescriptorID[] bindingDescriptors, boolean dryrun)Remove one or more existing bindings from a Service.voidremovePerNodeDesiredState(ServiceID id, int[] nodeIDs)Remove the per-node desired state for a Service on each of the specified nodes.voidsetDefaultDesiredState(ServiceID id, ServiceDesiredState state)Set the default desired state of a Service.voidsetInitialPersistence(ServiceID id, InitialPersistence initialPersistence)Set the initial persistence status for a Service.voidsetPerNodeDesiredState(ServiceID id, int[] nodeIDs, ServiceDesiredState state)Set the per-node desired state for a Service on each of the specified nodes.voidsetReplicationSelectors(ServiceID id, ReplicationSelector[] selectors)Set the replication selectors for a Service.voidsetServiceMetricsRecordingEnabled(ServiceID service, boolean enabled)Enable or disable the recording of metrics for a Service.voidsetStartingPriority(ServiceID service, byte priority)Set the starting priority for a Service.voidsetStoppingPriority(ServiceID service, byte priority)Set the stopping priority for a Service.
-
-
-
Method Detail
-
activate
void activate(ServiceID id) throws NullPointerException, UnrecognizedServiceException, InvalidStateException, InvalidLinkNameBindingStateException, UnconfiguredResourceException, ManagementException
Activate a Service on all nodes.
The Service must currently have an effective desired state of
ServiceDesiredState.inactiveon at least one live event routing node, as determined byRhinoHousekeepingMBean.getEventRouterNodes(). All per-node desired state for the Service is removed by this method and the default desired state of the Service is set toServiceDesiredState.active(if it is not already). Before this method returns, an attempt is then made to transition the Service to an actual state ofServiceActualState.activeon all event router nodes where the actual state is currentlyServiceActualState.inactive. Any node where the Service actual state isServiceActualState.stoppingwill wait (asynchronously) until the Service reaches theServiceActualState.inactivestate and then attempt to transition the Service back toServiceActualState.active.As a result of this method setting the default desired state to
ServiceDesiredState.active, any new event router nodes that boot into the cluster will assume an activated state for the Service unless per-node desired state is subsequently created to state otherwise.In difference to the methods that only set Service desired state and leave actual state transitions to the internal convergence subsystem, if this method returns by throwing an exception then the desired and actual states of the Service are left unchanged. For example, if an
InvalidLinkNameBindingStateExceptionis thrown, the Service actual state does not transition toServiceActualState.failedon any node but remains asServiceActualState.inactive.- Specified by:
activatein interfaceServiceManagementMBean- Parameters:
id- the component identifier of the Service.- Throws:
NullPointerException- ifidisnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.InvalidStateException- if the effective desired state of the Service is notServiceDesiredState.inactiveon any current event router node.InvalidLinkNameBindingStateException- if a resource adaptor entity link name binding required by an SBB in the Service does not exist or is bound to a resource adaptor entity that does not implement the resource adaptor type expected by the SBB.UnconfiguredResourceException- if a resource required by an SBB in the Service has not been configured.ManagementException- if the state of the Service could not be changed due to a system-level failure.
-
activate
void activate(ServiceID id, int[] nodeIDs) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, InvalidStateException, ManagementException
Activate a Service on the specified nodes.
The Service must currently have an effective desired state of
ServiceDesiredState.inactiveon all the specified nodes. Per-node desired state for the Service is created for each specified node if it does not already exist and set toServiceDesiredState.active. Before this method returns, an attempt is then made to transition the Service to an actual state ofServiceActualState.activeon all specified nodes that are current live event router nodes where the actual state isServiceActualState.inactive. Any node where the Service actual state isServiceActualState.stoppingwill wait (asynchronously) until the Service reaches theServiceActualState.inactivestate and then attempt to transition the Service back toServiceActualState.active.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 Service desired state on nodes yet to be started.
When using the pool clustering mode, this method can only be used to affect the state of the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(). Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To manage state for another node in pool mode, a client must connect directly with that node.This method does not affect the default desired state of the Service.
In difference to the methods that only set Service desired state and leave actual state transitions to the internal convergence subsystem, if this method returns by throwing an exception then the desired and actual states of the Service are left unchanged. For example, if an
InvalidLinkNameBindingStateExceptionis thrown, the Service actual state does not transition toServiceActualState.failedon any node but remains asServiceActualState.inactive.- Parameters:
id- the component identifier of the Service.nodeIDs- the node IDs of the nodes to activate the Service on.- Throws:
NullPointerException- if either argument isnull.InvalidArgumentException- ifnodeIDsis zero-length or contains invalid node IDs, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.InvalidStateException- if the effective desired state of the Service is notServiceDesiredState.inactiveon all specified nodes.InvalidLinkNameBindingStateException- if a resource adaptor entity link name binding required by an SBB in the Service does not exist or is bound to a resource adaptor entity that does not implement the resource adaptor type expected by the SBB.UnconfiguredResourceException- if a resource required by an SBB in the Service has not been configured.ManagementException- if the state of the Service could not be changed due to a system-level failure.
-
activate
void activate(ServiceID[] ids) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, InvalidStateException, InvalidLinkNameBindingStateException, UnconfiguredResourceException, ManagementException
Activate a set of Services on all nodes.
This method has the same requirements and behaviour for each individual Service as specified for
activate(ServiceID)except that the desired state of all specified Services is updated in a single transaction. If any Service fails to fulfil the necessary requirements for activation then none of the Services are activated.The sets of nodes where each Service has an effective desired state of
ServiceDesiredState.inactivedo not have to be the same. For example, if there are two event router nodes in a cluster: nodes 101 and 102, Service A has a desired state of inactive on node 101 and active on node 102, and Service B has a desired state of inactive on node 102 and active on node 101, it is still possible to successfully invoke this method specifying both Services and have Rhino activate each Service on the respective nodes where they are inactive.In difference to the methods that only set Service desired state and leave actual state transitions to the internal convergence subsystem, if this method returns by throwing an exception then the desired and actual states of the Services are left unchanged. For example, if an
InvalidLinkNameBindingStateExceptionis thrown, the corresponding Service actual state does not transition toServiceActualState.failedon any node but remains asServiceActualState.inactive.- Specified by:
activatein interfaceServiceManagementMBean- Parameters:
ids- a set of component identifiers of the Services to be activated.- Throws:
NullPointerException- ifidsisnull.InvalidArgumentException- ifidsis zero-length, or containsnullor duplicate elements.UnrecognizedServiceException- if any member ofidsis not a recognizableServiceIDfor the SLEE or does not correspond with a Service installed in the SLEE.InvalidStateException- if the effective desired state of any of the Services identified byidsis notServiceDesiredState.inactiveon any current event router node.InvalidLinkNameBindingStateException- if a resource adaptor entity link name binding required by an SBB in any of the Services does not exist or is bound to a resource adaptor entity that does not implement the resource adaptor type expected by the SBB.UnconfiguredResourceException- if a resource required by an SBB in the Service has not been configured.ManagementException- if the state of any Service could not be changed due to a system-level failure. In the case of such an error the state of all Services identified inidsremains unchanged.
-
activate
void activate(ServiceID[] ids, int[] nodeIDs) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, InvalidStateException, ManagementException
Activate a set of Services on the specified nodes.
This method has the same requirements and behaviour for each individual Service as specified for
activate(ServiceID, int[])except that the desired state of all specified Services is updated in a single transaction. If any Service fails to fulfil the necessary requirements for activation then none of the Services are activated.The sets of nodes where each Service has an effective desired state of
ServiceDesiredState.inactivedo not have to be the same. For example, nodes 101 and 102 are specified, Service A has a desired state of inactive on node 101 and active on node 102, and Service B has a desired state of inactive on node 102 and active on node 101, it is still possible to successfully invoke this method specifying both Services and that set of node IDs and have Rhino activate each Service on the respective nodes where they are inactive.In difference to the methods that only set Service desired state and leave actual state transitions to the internal convergence subsystem, if this method returns by throwing an exception then the desired and actual states of the Services are left unchanged. For example, if an
InvalidLinkNameBindingStateExceptionis thrown, the corresponding Service actual state does not transition toServiceActualState.failedon any node but remains asServiceActualState.inactive.- Parameters:
ids- a set of component identifiers of the Services to be activated.nodeIDs- the node IDs of the nodes to activate the Service on.- Throws:
NullPointerException- if either argument isnull.InvalidArgumentException- ifidsis zero-length, or containsnullor duplicate elements, ifnodeIDsis zero-length or contains invalid node IDs, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.UnrecognizedServiceException- if any member ofidsis not a recognizableServiceIDfor the SLEE or does not correspond with a Service installed in the SLEE.InvalidStateException- if the effective desired state of any of the Services identified byidsis notServiceDesiredState.inactiveon all specified nodes.InvalidLinkNameBindingStateException- if a resource adaptor entity link name binding required by an SBB in any of the Services does not exist or is bound to a resource adaptor entity that does not implement the resource adaptor type expected by the SBB.UnconfiguredResourceException- if a resource required by an SBB in the Service has not been configured.ManagementException- if the state of any Service could not be changed due to a system-level failure. In the case of such an error the state of all Services identified inidsremains unchanged.
-
deactivate
void deactivate(ServiceID id) throws NullPointerException, UnrecognizedServiceException, InvalidStateException, ManagementException
Deactivate a Service on all nodes.
The Service must currently have an effective desired state of
ServiceDesiredState.activeon at least one live event routing node, as determined byRhinoHousekeepingMBean.getEventRouterNodes(). All per-node desired state for the Service is removed by this method and the default desired state of the Service is set toServiceDesiredState.inactive(if it is not already). The Service then transitions to an actual state ofServiceActualState.stoppingon all event router nodes where the actual state is currentlyServiceActualState.activebefore this method returns.As a result of this method setting the default desired state to
ServiceDesiredState.inactive, any new event router nodes that boot into the cluster will assume an inactive state for the Service unless per-node desired state is subsequently created to state otherwise.- Specified by:
deactivatein interfaceServiceManagementMBean- Parameters:
id- the component identifier of the Service.- Throws:
NullPointerException- ifidisnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.InvalidStateException- if the effective desired state of the Service is notServiceDesiredState.activeon any current event router node.ManagementException- if the state of the Service could not be changed due to a system-level failure.
-
deactivate
void deactivate(ServiceID id, int[] nodeIDs) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, InvalidStateException, ManagementException
Deactivate a Service on the specified nodes.
The Service must currently have an effective desired state of
ServiceDesiredState.activeon all the specified nodes. Per-node desired state for the Service is created for each specified node if it does not already exist and set toServiceDesiredState.inactive. The Service then transitions to an actual state ofServiceActualState.stoppingon all specified nodes that are current live event router nodes where the actual state isServiceActualState.activebefore 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 Service desired state on nodes yet to be started.
When using the pool clustering mode, this method can only be used to affect the state of the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(). Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To manage state for another node in pool mode, a client must connect directly with that node.This method does not affect the default desired state of the Service.
- Parameters:
id- the component identifier of the Service.nodeIDs- the node IDs of the nodes to deactivate the Service on.- Throws:
NullPointerException- if either argument isnull.InvalidArgumentException- ifnodeIDsis zero-length or contains invalid node IDs, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.InvalidStateException- if the effective desired state of the Service is notServiceDesiredState.activeon all specified nodes.ManagementException- if the state of the Service could not be changed due to a system-level failure.
-
deactivate
void deactivate(ServiceID[] ids) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, InvalidStateException, ManagementException
Deactivate a set of Services on all nodes.
This method has the same requirements and behaviour for each individual Service as specified for
deactivate(ServiceID)except that the desired state of all specified Services is updated in a single transaction. If any Service fails to fulfil the necessary requirements for deactivation then none of the Services are deactivated.The sets of nodes where each Service has an effective desired state of
ServiceDesiredState.activedo not have to be the same. For example, if there are two event router nodes in a cluster: nodes 101 and 102, Service A has a desired state of inactive on node 101 and active on node 102, and Service B has a desired state of inactive on node 102 and active on node 101, it is still possible to successfully invoke this method specifying both Services and have Rhino deactivate each Service on the respective nodes where they are active.- Specified by:
deactivatein interfaceServiceManagementMBean- Parameters:
ids- a set of component identifiers of Services to be deactivated.- Throws:
NullPointerException- ifidsisnull.InvalidArgumentException- ifidsis zero-length, or containsnullor duplicate elements.UnrecognizedServiceException- if any member ofidsis not a recognizableServiceIDfor the SLEE or does not correspond with a Service installed in the SLEE.InvalidStateException- if the effective desired state of any of the Services identified byidsis notServiceDesiredState.activeon any current event router node.ManagementException- if the state of any Service could not be changed due to a system-level failure. In the case of such an error the state of all Services identified inidsremains unchanged.
-
deactivate
void deactivate(ServiceID[] ids, int[] nodeIDs) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, InvalidStateException, ManagementException
Deactivate a set of Services on the specified nodes.
This method has the same requirements and behaviour for each individual Service as specified for
deactivate(ServiceID, int[])except that the desired state of all specified Services is updated in a single transaction. If any Service fails to fulfil the necessary requirements for deactivation then none of the Services are deactivated.The sets of nodes where each Service has an effective desired state of
ServiceDesiredState.activedo not have to be the same. For example, nodes 101 and 102 are specified, Service A has a desired state of inactive on node 101 and active on node 102, and Service B has a desired state of inactive on node 102 and active on node 101, it is still possible to successfully invoke this method specifying both Services and that set of node IDs and have Rhino deactivate each Service on the respective nodes where they are active.- Parameters:
ids- a set of component identifiers of Services to be deactivated.nodeIDs- the node IDs of the nodes to deactivate the Service on.- Throws:
NullPointerException- if either argument isnull.InvalidArgumentException- ifidsis zero-length, or containsnullor duplicate elements, ifnodeIDsis zero-length or contains invalid node IDs, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.UnrecognizedServiceException- if any member ofidsis not a recognizableServiceIDfor the SLEE or does not correspond with a Service installed in the SLEE.InvalidStateException- if the effective desired state of any of the Services identified byidsis notServiceDesiredState.activeon all specified nodes.ManagementException- if the state of any Service could not be changed due to a system-level failure. In the case of such an error the state of all Services identified inidsremains unchanged.
-
deactivateAndActivate
void deactivateAndActivate(ServiceID deactivateID, ServiceID activateID) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, InvalidStateException, InvalidLinkNameBindingStateException, ManagementException
Deactivate a Service and activate another Service on all nodes.
The deactivating Service must currently have an effective desired state of
ServiceDesiredState.activeon at least one live event routing node, as determined byRhinoHousekeepingMBean.getEventRouterNodes(). The activating Service must currently have an effective desired state ofServiceDesiredState.inactiveon at least one live event routing node. The sets of event router nodes where the deactivating Service has a desired state ofServiceDesiredState.activeand where the activating Service has a desired state ofServiceDesiredState.inactivedo not have to be the same.All per-node desired state for both Services is removed by this method. The default desired state of the deactivating Service is set to
ServiceDesiredState.inactiveand the default desired state of the activating Service is set toServiceDesiredState.active(if they are not already). Then, before this method returns, the deactivating Service transitions to an actual state ofServiceActualState.stoppingon all event router nodes where the actual state is currentlyServiceActualState.active, and an attempt is made to transition the activating Service to an actual state ofServiceActualState.activeon all event router nodes where the actual state is currentlyServiceActualState.inactive. Any node where the activating Service’s actual state isServiceActualState.stoppingwill wait (asynchronously) until the Service reaches theServiceActualState.inactivestate and then attempt to transition the Service back toServiceActualState.active.As a result of this method setting default desired states, any new event router nodes that boot into the cluster will assume the updated desired state for the Services unless per-node desired state is subsequently created to state otherwise.
In difference to the methods that only set Service desired state and leave actual state transitions to the internal convergence subsystem, if this method returns by throwing an exception then the desired and actual states of the Services are left unchanged. For example, if an
InvalidLinkNameBindingStateExceptionis thrown, the corresponding Service actual state does not transition toServiceActualState.failedon any node but remains asServiceActualState.inactive.- Specified by:
deactivateAndActivatein interfaceServiceManagementMBean- Parameters:
deactivateID- the component identifier of the Service to be deactivated.activateID- the component identifier of the Service to be activated.- Throws:
NullPointerException- if either argument isnull.InvalidArgumentException- ifdeactivateIDandactivateIDidentify the same Service.UnrecognizedServiceException- if either argument is not a recognizableServiceIDfor the SLEE or does not correspond with a Service installed in the SLEE.InvalidStateException- if the effective desired state of the Service identified bydeactivateIDon any current event router node is notServiceDesiredState.activeor the effective desired state of the Service identified byactivateIDon any current event router node is notServiceDesiredState.inactive.InvalidLinkNameBindingStateException- if a resource adaptor entity link name binding required by an SBB in the activating Service does not exist or is bound to a resource adaptor entity that does not implement the resource adaptor type expected by the SBB.ManagementException- if the state of either Service could not be changed due to a system-level failure. In the case of such an error the state of both Services remains unchanged.
-
deactivateAndActivate
void deactivateAndActivate(ServiceID deactivateID, ServiceID activateID, int[] nodeIDs) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, InvalidStateException, ManagementException
Deactivate a Service and activate another Service on the specified nodes.
The deactivating Service must currently have an effective desired state of
ServiceDesiredState.activeand the activating Service must currently have an effective desired state ofServiceDesiredState.inactiveon all the specified nodes. Per-node desired state for both Services is created for each specified node if it does not already exist. The per-node desired state of the deactivating Service is set toServiceDesiredState.inactiveand the per-node desired state of the activating Service is set toServiceDesiredState.active. Then, before this method returns, the deactivating Service transitions to an actual state ofServiceActualState.stoppingon all specified nodes that are current live event router nodes where the actual state is currentlyServiceActualState.active, and an attempt is made to transition the activating Service to an actual state ofServiceActualState.activeon all specified nodes that are current live event router nodes where the actual state is currentlyServiceActualState.inactive. Any relevant node where the activating Service’s actual state isServiceActualState.stoppingwill wait (asynchronously) until the Service reaches theServiceActualState.inactivestate and then attempt to transition the Service back toServiceActualState.active.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 Service desired state on nodes yet to be started.
When using the pool clustering mode, this method can only be used to affect the state of the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(). Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To manage state for another node in pool mode, a client must connect directly with that node.This method does not affect the default desired state of either Service.
In difference to the methods that only set Service desired state and leave actual state transitions to the internal convergence subsystem, if this method returns by throwing an exception then the desired and actual states of the Services are left unchanged. For example, if an
InvalidLinkNameBindingStateExceptionis thrown, the corresponding Service actual state does not transition toServiceActualState.failedon any node but remains asServiceActualState.inactive.- Parameters:
deactivateID- the component identifier of the Service to be deactivated.activateID- the component identifier of the Service to be activated.nodeIDs- the node IDs of the nodes to activate and deactivate the Services on.- Throws:
NullPointerException- if any argument isnull.InvalidArgumentException- ifdeactivateIDandactivateIDidentify the same Service, ifnodeIDsis zero-length or contains invalid node IDs, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.UnrecognizedServiceException- if either argument is not a recognizableServiceIDfor the SLEE or does not correspond with a Service installed in the SLEE.InvalidStateException- if the effective desired state of the Service identified bydeactivateIDis notServiceDesiredState.activeon all specified nodes, or the effective desired state of the Service identified byactivateIDis notServiceDesiredState.inactiveon all specified nodes.InvalidLinkNameBindingStateException- if a resource adaptor entity link name binding required by an SBB in the activating Service does not exist or is bound to a resource adaptor entity that does not implement the resource adaptor type expected by the SBB.ManagementException- if the state of either Service could not be changed due to a system-level failure. In the case of such an error the state of both Services remains unchanged.
-
deactivateAndActivate
void deactivateAndActivate(ServiceID[] deactivateIDs, ServiceID[] activateIDs) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, InvalidStateException, InvalidLinkNameBindingStateException, ManagementException
Deactivate one set of Services and activate another set of Services on all nodes.
This method has the same requirements and behaviour for each individual Service as specified for
deactivateAndActivate(ServiceID, ServiceID)except that the desired state of all specified Services is updated in a single transaction. If any Service fails to fulfil the necessary requirements for deactivation or activation then none of the Services are affected.The sets of nodes where each Service has the required effected desired state do not have to be the same.
In difference to the methods that only set Service desired state and leave actual state transitions to the internal convergence subsystem, if this method returns by throwing an exception then the desired and actual states of the Services are left unchanged. For example, if an
InvalidLinkNameBindingStateExceptionis thrown, the corresponding Service actual state does not transition toServiceActualState.failedon any node but remains asServiceActualState.inactive.- Specified by:
deactivateAndActivatein interfaceServiceManagementMBean- Parameters:
deactivateIDs- a set of component identifiers of Services to be deactivated.activateIDs- a set of component identifiers of Services to be activated.- Throws:
NullPointerException- if either argument isnull.InvalidArgumentException- if either argument is zero-length, containsnullor duplicate elements, or a Service identified by a component identifier indeactivateIDsis the same as a Service identified by a component identifier inactivateIDs,UnrecognizedServiceException- if any member ofdeactivateIDsoractivateIDsis not a recognizableServiceIDfor the SLEE or does not correspond with a Service installed in the SLEE.InvalidStateException- if the effective desired state of any of the Services identified bydeactivateIDson any current event router node is notServiceDesiredState.activeor the effective desired state of any of the Services identified byactivateIDson any current event router node is notServiceDesiredState.inactive.InvalidLinkNameBindingStateException- if a resource adaptor entity link name binding required by an SBB in any of the activating Services does not exist or is bound to a resource adaptor entity that does not implement the resource adaptor type expected by the SBB.ManagementException- if the state of any of the Services could not be changed due to a system-level failure. In the case of such an error the state of all Services identified indeactivateIDsandactivateIDsremains unchanged.
-
deactivateAndActivate
void deactivateAndActivate(ServiceID[] deactivateIDs, ServiceID[] activateIDs, int[] nodeIDs) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, InvalidStateException, ManagementException
Deactivate one set of Services and activate another set of Services on the specified nodes.
This method has the same requirements and behaviour for each individual Service as specified for
deactivateAndActivate(ServiceID, ServiceID, int[])except that the desired state of all specified Services is updated in a single transaction. If any Service fails to fulfil the necessary requirements for deactivation or activation then none of the Services are affected.The sets of nodes where each Service has the required effected desired state do not have to be the same.
In difference to the methods that only set Service desired state and leave actual state transitions to the internal convergence subsystem, if this method returns by throwing an exception then the desired and actual states of the Services are left unchanged. For example, if an
InvalidLinkNameBindingStateExceptionis thrown, the corresponding Service actual state does not transition toServiceActualState.failedon any node but remains asServiceActualState.inactive.- Parameters:
deactivateIDs- a set of component identifiers of Services to be deactivated.activateIDs- a set of component identifiers of Services to be activated.nodeIDs- the node IDs of the nodes to activate and deactivate the Services on.- Throws:
NullPointerException- if any argument isnull.InvalidArgumentException- if either thedeactivateIDsoractivateIDsargument is zero-length, containsnullor duplicate elements, or a Service identified by a component identifier indeactivateIDsis the same as a Service identified by a component identifier inactivateIDs, ifnodeIDsis zero-length or contains invalid node IDs, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.UnrecognizedServiceException- if any member ofdeactivateIDsoractivateIDsis not a recognizableServiceIDfor the SLEE or does not correspond with a Service installed in the SLEE.InvalidStateException- if the effective desired state of any of the Services identified bydeactivateIDsis notServiceDesiredState.activeon all specified nodes, or the effective desired state of any of the Services identified byactivateIDsis notServiceDesiredState.inactiveon all specified nodes.InvalidLinkNameBindingStateException- if a resource adaptor entity link name binding required by an SBB in any of the activating Services does not exist or is bound to a resource adaptor entity that does not implement the resource adaptor type expected by the SBB.ManagementException- if the state of any of the Services could not be changed due to a system-level failure. In the case of such an error the state of all Services identified indeactivateIDsandactivateIDsremains unchanged.
-
getServices
ServiceID[] getServices(ServiceState state) throws NullPointerException, ManagementException
Get the set of Services that are in a particular state.
This method returns the set of Services in the specified state on the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(). This method translates the actual state of each Service on the node to an equivalent JAIN SLEE-defined state for comparison purposes.- Specified by:
getServicesin interfaceServiceManagementMBean- Parameters:
state- the required state.- Returns:
- an array of
ServiceIDobjects identifying the services that are in the specified state on the invoked node. - Throws:
NullPointerException- ifstateisnull.ManagementException- if the set of services could not be obtained due to a system-level failure.
-
getServices
ServiceID[] getServices(ServiceState state, int nodeID) throws NullPointerException, InvalidArgumentException, ManagementException
Get the set of Services that are in a particular state on the specified node.
When using the savanna clustering mode, the specified node does not have to be a current cluster member. For example this method can be used to query the activation state for Services on a node yet to be started.
When using the pool clustering mode, the
nodeIDargument must be equal to the node ID of the node the management client directs this method call at, as determined byRhinoHousekeepingMBean.getNodeID(). Consequently, this method will behave no differently togetServices(ServiceState)when in this mode. To query state for another node, a client must connect directly with that node.This method translates the desired or actual state of each Service to an equivalent JAIN SLEE-defined state for comparison purposes depending on the presence of the specified node. If the specified node is a current live event router node, then actual state is used. Otherwise, desired state is used.
- Parameters:
state- the required state.nodeID- the node ID of the node to obtain service state information from.- Returns:
- an array of
ServiceIDobjects identifying the Services that are in the specified state on the specified node. - Throws:
NullPointerException- ifstateisnull.InvalidArgumentException- ifnodeIDis invalid.ManagementException- if the set of services could not be obtained due to a system-level failure.
-
getState
ServiceState getState(ServiceID id) throws NullPointerException, UnrecognizedServiceException, ManagementException
Get the current state of a Service. This method returns the state of the Service on the node the management client directs the method call at, as determined by
RhinoHousekeepingMBean.getNodeID().This method translates the actual state of the Service on the node to an equivalent JAIN SLEE-defined state.
- Specified by:
getStatein interfaceServiceManagementMBean- Parameters:
id- the component identifier of the Service.- Returns:
- the current state of the Service on the invoked node.
- Throws:
NullPointerException- ifidisnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the state of the Service could not be obtained due to a system-level failure.
-
getState
ServiceState[] getState(ServiceID id, int[] nodeIDs) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, ManagementException
Get the current state of a Service on each of the specified nodes.
When using the savanna clustering mode, this method translates the desired or actual state of the Service 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 service. Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To query state for another node, a client must connect directly with that node.- Parameters:
id- the component identifier of the Service.nodeIDs- the node IDs of the nodes to return the Service’s state for.- Returns:
- an array of service state objects.
This array will be the same length as the supplied
nodeIDsarray, and ifstates = getState(id, nodeIDs)thenstates[i]equals the state of the Service on nodenodeIDs[i]. If there is no state information for the Service on a particular node,ServiceState.INACTIVEis returned as the resulting state for the Service on that node. - Throws:
NullPointerException- if either argument isnull.InvalidArgumentException- ifnodeIDsis zero-length or contains invalid node IDs, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the state of the Service could not be obtained due to a system-level failure.
-
getNodes
int[] getNodes(ServiceID id, ServiceState state) throws NullPointerException, UnrecognizedServiceException, ManagementException
Get the set of event-router nodes in the primary component where the Service is in the specified state.
This method translates the actual state of the Service on each node to an equivalent JAIN SLEE-defined state for comparison purposes.
- Parameters:
id- the component identifier of the Service.state- the required state.- Returns:
- an array of node IDs identifying the event-router nodes where the Service is in the specified state.
- Throws:
NullPointerException- if either argument isnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the set of nodes where the Service is in the required state could not be determined due to a system-level failure.
-
getServiceUsageMBean
ObjectName getServiceUsageMBean(ServiceID id) throws NullPointerException, UnrecognizedServiceException, ManagementException
- Specified by:
getServiceUsageMBeanin interfaceServiceManagementMBean- Throws:
NullPointerExceptionUnrecognizedServiceExceptionManagementException
-
addBinding
BindingResult addBinding(ServiceID id, BindingDescriptorID bindingDescriptor, Map<ComponentID,ComponentID> componentMappings, boolean dryrun) throws NullPointerException, UnrecognizedServiceException, UnrecognizedBindingDescriptorException, BindingAlreadyExistsException, InvalidArgumentException, InvalidStateException, BindingVerificationException, ManagementException
Add a binding to a Service. Components in the Service are modified with the addition of the deployment metadata contained by the specified binding descriptor.
Bindings can only be added to a Service that is in the INACTIVE state.
This method will implicitly create new components (as copies of original components) or remove copied components no longer required (due to component mapping changes) as a result of the binding operation. After the binding operation completes, affected components that remain will have an install level of
InstallLevel.VERIFIED.- Parameters:
id- the component identifier of the Service.bindingDescriptor- the component identifier of the binding descriptor.componentMappings- component mappings for copied components. If an existing component needs to be copied as a result of the binding, and the component identifier of the component to be copied is a key in this map, then the copied component will have the identity given by the value of the mapping, rather than a default value generated by the SLEE. This parameter may benullif no specific mappings are required.dryrun- iftrue, the SLEE will validate the binding operation and return the result as if the binding operation completed, but will not actually commit any changes to the SLEE.- Returns:
- the result of the binding operation.
- Throws:
NullPointerException- ifidorbindingDescriptorisnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.UnrecognizedBindingDescriptorException- ifbindingDescriptoris not a recognizableBindingDescriptorIDfor the SLEE or it does not correspond with a binding descriptor installed in the SLEE.BindingAlreadyExistsException- if the binding descriptor has already been added to the Service.InvalidArgumentException- ifcomponentMappingscontains a mapping that cannot be used, for example the source and target identifiers represent different component types, or a component with the target identity already exists and cannot be reused for this Service.InvalidStateException- if the current state of the Service on all nodes is notServiceState.INACTIVEBindingVerificationException- if adding the binding to the Service would cause the Service to have an invalid configuration. For example, the binding descriptor may reference a component that is not installed in the SLEE, or reference an SBB that is not part of the Service.ManagementException- if the binding could not be added to the Service due to a system-level failure.- Since:
- Rhino 2.4.0
-
addBindings
BindingResult addBindings(ServiceID id, BindingDescriptorID[] bindingDescriptors, Map<ComponentID,ComponentID> componentMappings, boolean dryrun) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, UnrecognizedBindingDescriptorException, BindingAlreadyExistsException, InvalidStateException, BindingVerificationException, ManagementException
Add one or more bindings to a Service. Components in the Service are modified with the addition of the deployment metadata contained by the specified binding descriptors.
Bindings can only be added to a Service that is in the INACTIVE state.
This method will implicitly create new components (as copies of original components) or remove copied components no longer required (due to component mapping changes) as a result of the binding operation. After the binding operation completes, affected components that remain will have an install level of
InstallLevel.VERIFIED.- Parameters:
id- the component identifier of the Service.bindingDescriptors- the component identifiers of the binding descriptors.componentMappings- component mappings for copied components. If an existing component needs to be copied as a result of the binding, and the component identifier of the component to be copied is a key in this map, then the copied component will have the identity given by the value of the mapping, rather than a default value generated by the SLEE. This parameter may benullif no specific mappings are required.dryrun- iftrue, the SLEE will validate the binding operation and return the result as if the binding operation completed, but will not actually commit any changes to the SLEE.- Returns:
- the result of the binding operation.
- Throws:
NullPointerException- ifidorbindingDescriptorsisnull.InvalidArgumentException- ifbindingDescriptorsis zero-length, or containsnullor duplicate elements, or ifcomponentMappingscontains a mapping that cannot be used, for example the source and target identifiers represent different component types, or a component with the target identity already exists and cannot be reused for this Service.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.UnrecognizedBindingDescriptorException- if any member ofbindingDescriptorsis not a recognizableBindingDescriptorIDfor the SLEE or does not correspond with a binding descriptor installed in the SLEE.BindingAlreadyExistsException- if any member ofbindingDescriptorshas already been added to the Service.InvalidStateException- if the current state of the Service on all nodes is notServiceState.INACTIVEBindingVerificationException- if adding the bindings to the Service would cause the Service to have an invalid configuration. For example, a binding descriptor may reference a component that is not installed in the SLEE, or reference an SBB that is not part of the Service.ManagementException- if the bindings could not be added to the Service due to a system-level failure.- Since:
- Rhino 2.4.0
-
removeBinding
BindingResult removeBinding(ServiceID id, BindingDescriptorID bindingDescriptor, boolean dryrun) throws NullPointerException, UnrecognizedServiceException, UnrecognizedBindingDescriptorException, NoSuchBindingException, InvalidStateException, BindingVerificationException, ManagementException
Remove an existing binding from a Service. Components in the Service may revert to their original deployed state as the deployment metadata contained by the specified binding descriptor is removed.
Bindings can only be removed from a Service that is in the INACTIVE state.
This method will implicitly remove copied dependent components no longer required due to the removal of the binding. A copied Service component however will not be removed - this must be
removedseparately if no longer required.After the binding operation completes, affected components that remain will have an install level of
InstallLevel.VERIFIED.- Parameters:
id- the component identifier of the Service.bindingDescriptor- the component identifier of the binding descriptor.dryrun- iftrue, the SLEE will validate the binding operation and return the result as if the binding operation completed, but will not actually commit any changes to the SLEE.- Returns:
- the result of the binding operation.
- Throws:
NullPointerException- ifidorbindingDescriptorisnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.UnrecognizedBindingDescriptorException- ifbindingDescriptoris not a recognizableBindingDescriptorIDfor the SLEE or it does not correspond with a binding descriptor installed in the SLEE.NoSuchBindingException- if the binding descriptor has not been added to the Service.InvalidStateException- if the current state of the Service on all nodes is notServiceState.INACTIVEBindingVerificationException- if removing the binding from the Service would cause the Service to have an invalid configuration. For example, remaining bindings may reference a component that is no longer part of the Service.ManagementException- if the bindings could not be removed from the Service due to a system-level failure.- Since:
- Rhino 2.4.0
-
removeBindings
BindingResult removeBindings(ServiceID id, BindingDescriptorID[] bindingDescriptors, boolean dryrun) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, UnrecognizedBindingDescriptorException, NoSuchBindingException, InvalidStateException, BindingVerificationException, ManagementException
Remove one or more existing bindings from a Service. Components in the Service may revert to their original deployed state as the deployment metadata contained by the specified binding descriptor is removed.
Bindings can only be removed from a Service that is in the INACTIVE state.
This method will implicitly remove copied dependent components no longer required due to the removal of the binding. A copied Service component however will not be removed - this must be
removedseparately if no longer required.After the binding operation completes, affected components that remain will have an install level of
InstallLevel.VERIFIED.- Parameters:
id- the component identifier of the Service.bindingDescriptors- the component identifiers of the binding descriptors.dryrun- iftrue, the SLEE will validate the binding operation and return the result as if the binding operation completed, but will not actually commit any changes to the SLEE.- Returns:
- the result of the binding operation.
- Throws:
NullPointerException- ifidorbindingDescriptorsisnull.InvalidArgumentException- ifbindingDescriptorsis zero-length, or containsnullor duplicate elements.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.UnrecognizedBindingDescriptorException- if any member ofbindingDescriptorsis not a recognizableBindingDescriptorIDfor the SLEE or does not correspond with a binding descriptor installed in the SLEE.NoSuchBindingException- if any member ofbindingDescriptorsis not currently associated with the Service.InvalidStateException- if the current state of the Service on all nodes is notServiceState.INACTIVEBindingVerificationException- if removing the binding descriptor associations would cause the Service to have an invalid configuration. For example, a binding descriptor association that remains may reference an SBB that is no longer part of the Service.ManagementException- if the binding descriptors could not be associated with the Service due to a system-level failure.- Since:
- Rhino 2.4.0
-
getBindings
BindingDescriptorID[] getBindings(ServiceID id) throws NullPointerException, UnrecognizedServiceException, ManagementException
Get the set of binding descriptors currently associated with a Service.
- Parameters:
id- the component identifier of the Service.- Returns:
- an array of binding descriptor identifiers.
- Throws:
NullPointerException- ifidisnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the identifiers could not be obtained due to a system-level failure.- Since:
- Rhino 2.4.0
-
setReplicationSelectors
void setReplicationSelectors(ServiceID id, ReplicationSelector[] selectors) throws NullPointerException, UnrecognizedServiceException, InvalidStateException, ManagementException
Set the replication selectors for a Service. The replication selectors determine the conditions under which replication will be enabled for the Service. If no condition matches at deployment time then the Service will not be replicated.
The default replication selectors for a Service can be specified in its deployment descriptor. This method allows those selectors to be changed after the Service has been installed.
The replication selectors for a Service can only be changed if the Service is not yet deployed. That is, the install level of the Service component must be either
InstallLevel.INSTALLEDorInstallLevel.VERIFIED.If a Service has no replication selectors, it will never be replicated.
- Parameters:
id- the component identifier of the Service.selectors- the replication selectors. May benullas a substitute for an empty list to denote no selectors.- Throws:
NullPointerException- ifidisnull.UnrecognizedServiceException- ifidis not a recognisableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.InvalidStateException- if the install level of the Service indicates that it is already deployed.ManagementException- if the replication selectors could not be changed due to a system-level failure.- Since:
- Rhino 2.6.1
-
getReplicationSelectors
ReplicationSelector[] getReplicationSelectors(ServiceID id) throws NullPointerException, UnrecognizedServiceException, ManagementException
Get the current replication selectors for a Service.
- Parameters:
id- the component identifier of the Service.- Returns:
- the replication selectors, or an empty array if no selectors are present.
- Throws:
NullPointerException- ifidisnull.UnrecognizedServiceException- ifidis not a recognisableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the replication selectors could not be obtained due to a system-level failure.- Since:
- Rhino 2.6.1
-
getReplicationSelectors
ReplicationSelector[][] getReplicationSelectors(ServiceID[] services) throws NullPointerException, ManagementException
Get an array of the replication selectors corresponding to an array of Service component identifiers.
- Parameters:
services- the array of Service component identifiers.- Returns:
- an array of replication selectors.
This array will be the same length as the supplied array, and if
replicationSelectors = getReplicationSelectors(services)thenreplicationSelectors[i] == getReplicationSelector(services[i]). Any unrecognised component identifier present inservicesresults in anullvalue at the corresponding array index in this array. - Throws:
NullPointerException- ifservicesisnull.ManagementException- if the replication selectors could not be obtained due to a system-level failure.- Since:
- Rhino 2.6.1
-
setStartingPriority
void setStartingPriority(ServiceID service, byte priority) throws NullPointerException, UnrecognizedServiceException, ManagementException
Set the starting priority for a Service. The starting priority determines the order in which services and resource adaptor entities together are started when the SLEE transitions from the STOPPED state to the RUNNING state.
Priorities are values between -128 and 127. If a component (Service or resource adaptor entity), X, has a numerically higher priority value than another component, Y, then X will be started before Y. Components with the same priority may be started in an arbitrary order, or may be started concurrently.
- Parameters:
service- the component identifier of the Service.priority- the starting priority for the Service.- Throws:
NullPointerException- ifidisnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the starting priority of the Service could not be updated due to a system-level failure.- Since:
- Rhino 2.4.0
- See Also:
setStoppingPriority(ServiceID, byte)
-
getStartingPriority
byte getStartingPriority(ServiceID service) throws NullPointerException, UnrecognizedServiceException, ManagementException
Get the starting priority for a Service.
- Parameters:
service- the component identifier of the Service.- Returns:
- the starting priority of the Service.
- Throws:
NullPointerException- ifidisnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the starting priority of the Service could not be obtained due to a system-level failure.- Since:
- Rhino 2.4.0
- See Also:
setStartingPriority(ServiceID, byte)
-
getStartingPriorities
Byte[] getStartingPriorities(ServiceID[] services) throws NullPointerException, ManagementException
Get an array of starting priorities corresponding to an array of Service component identifiers.
- Parameters:
services- the array of Service component identifiers.- Returns:
- an array of starting priorities.
This array will be the same length as the supplied array, and if
priorities = getStartingPriorities(services)thenpriorities[i] == getStartingPriority(services[i]). Any unrecognised component identifier present inservicesresults in anullvalue at the corresponding array index in this array. - Throws:
NullPointerException- ifservicesisnull.ManagementException- if the starting priorities could not be obtained due to a system-level failure.- Since:
- Rhino 2.4.0
-
setStoppingPriority
void setStoppingPriority(ServiceID service, byte priority) throws NullPointerException, UnrecognizedServiceException, ManagementException
Set the stopping priority for a Service. The stopping priority determines the order in which services and resource adaptor entities together are stopped when the SLEE transitions from the RUNNING state to the STOPPING state.
Priorities are values between -128 and 127. If a component (Service or resource adaptor entity), X, has a numerically higher priority value than another component, Y, then X will be stopped before Y. Components with the same priority may be stopped in an arbitrary order, or may be stopped concurrently.
- Parameters:
service- the component identifier of the Service.priority- the stopping priority for the Service.- Throws:
NullPointerException- ifidisnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the stopping priority of the Service could not be updated due to a system-level failure.- Since:
- Rhino 2.4.0
- See Also:
setStartingPriority(ServiceID, byte)
-
getStoppingPriority
byte getStoppingPriority(ServiceID service) throws NullPointerException, UnrecognizedServiceException, ManagementException
Get the stopping priority for a Service.
- Parameters:
service- the component identifier of the Service.- Returns:
- the stopping priority of the Service.
- Throws:
NullPointerException- ifidisnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the stopping priority of the Service could not be obtained due to a system-level failure.- Since:
- Rhino 2.4.0
- See Also:
setStoppingPriority(ServiceID, byte)
-
getStoppingPriorities
Byte[] getStoppingPriorities(ServiceID[] services) throws NullPointerException, ManagementException
Get an array of stopping priorities corresponding to an array of Service component identifiers.
- Parameters:
services- the array of Service component identifiers.- Returns:
- an array of stopping priorities.
This array will be the same length as the supplied array, and if
priorities = getStoppingPriorities(services)thenpriorities[i] == getStoppingPriority(services[i]). Any unrecognised component identifier present inservicesresults in anullvalue at the corresponding array index in this array. - Throws:
NullPointerException- ifservicesisnull.ManagementException- if the stopping priorities could not be obtained due to a system-level failure.- Since:
- Rhino 2.4.0
-
setServiceMetricsRecordingEnabled
void setServiceMetricsRecordingEnabled(ServiceID service, boolean enabled) throws NullPointerException, UnrecognizedServiceException, ManagementException
Enable or disable the recording of metrics for a Service. Metrics are recorded using Rhino’s statistics subsystem and may be viewed using any statistics client.
A small performance overhead may be noted when metrics recording is enabled.
- Parameters:
service- the component identifier of the Service.enabled- boolean flag indicating if metrics should be enabled (true) or disabled (false).- Throws:
NullPointerException- ifidisnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the metrics recording status could not be updated due to a system-level failure.
-
getServiceMetricsRecordingEnabled
boolean getServiceMetricsRecordingEnabled(ServiceID service) throws NullPointerException, UnrecognizedServiceException, ManagementException
Determine if the recording of metrics for a Service is currently enabled or disabled.
- Parameters:
service- the component identifier of the Service.- Returns:
trueif metrics recording is currently enabled for the Service,falseotherwise.- Throws:
NullPointerException- ifidisnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the metrics recording status could not be obtained due to a system-level failure.
-
setInitialPersistence
void setInitialPersistence(ServiceID id, InitialPersistence initialPersistence) throws NullPointerException, UnrecognizedServiceException, ManagementException
Set the initial persistence status for a Service.
- Parameters:
id- the component identifier of the Service.initialPersistence- the initial persistence status for the Service.- Throws:
NullPointerException- if eitheridorinitialPersistenceisnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the initial persistence status could not be updated due to a system-level failure.- Since:
- Rhino 2.6.2
-
getInitialPersistence
InitialPersistence getInitialPersistence(ServiceID id) throws NullPointerException, UnrecognizedServiceException, ManagementException
Get the initial persistence status for a Service.
- Parameters:
id- the component identifier of the Service.- Returns:
- the initial persistence status of the Service.
- Throws:
NullPointerException- ifidisnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the initial persistence status could not be obtained due to a system-level failure.- Since:
- Rhino 2.6.2
-
getDefaultInitialPersistenceEnabled
boolean getDefaultInitialPersistenceEnabled(ServiceID id) throws UnrecognizedServiceException, ManagementException
Get the default initial persistence enabled status for a Service as specified in its descriptor.
- Parameters:
id- the component identifier of the Service.- Returns:
- the default initial persistence enabled status of the Service.
- Throws:
NullPointerException- ifidisnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the initial persistence status could not be obtained due to a system-level failure.- Since:
- Rhino 2.6.2
-
getDefaultDesiredState
ServiceDesiredState getDefaultDesiredState(ServiceID id) throws NullPointerException, UnrecognizedServiceException, ManagementException, InvalidArgumentException
Get the current default desired state of a Service. The default desired state is used when no per-node service state exists on a given node.
- Parameters:
id- the component identifier of the Service.- Returns:
- the current default desired state of the Service.
- Throws:
NullPointerException- ifidisnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the state of the Service could not be obtained due to a system-level failure.InvalidArgumentException- if the specified Service exists but does not have an install level of DEPLOYED.- Since:
- Rhino 3.0.0
-
getNodesWithDesiredState
int[] getNodesWithDesiredState(ServiceID id) throws NullPointerException, UnrecognizedServiceException, InvalidArgumentException, ManagementException
Get the set of node IDs where per-node desired state exists for the specified Service. This set may include nodes which are not currently part of the cluster.
- Parameters:
id- the component identifier of the Service.- Returns:
- an array of node IDs.
- Throws:
NullPointerException- ifidisnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.InvalidArgumentException- if the specified Service exists but does not have an install level of DEPLOYED.ManagementException- if the set of node IDs could could not be determined due to a system-level failure.- Since:
- Rhino 3.0.0
-
setDefaultDesiredState
void setDefaultDesiredState(ServiceID id, ServiceDesiredState state) throws NullPointerException, UnrecognizedServiceException, InvalidArgumentException, ManagementException
Set the default desired state of a Service. The default desired state is used when no per-node service state exists on a given node.
- Parameters:
id- the component identifier of the Service.state- the new default desired state for the Service.- Throws:
NullPointerException- ifidorstateisnull.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.InvalidArgumentException- if the specified Service exists but does not have an install level of DEPLOYED.ManagementException- if the state of the Service could not be set due to a system-level failure.- Since:
- Rhino 3.0.0
-
getPerNodeDesiredState
ServiceDesiredState getPerNodeDesiredState(ServiceID id, int nodeID) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, ManagementException
Get the current per-node desired state of a Service on the specified node.
If per-node state exists for the Service on the target node then the state contained therein is returned, otherwise
nullis returned instead.When using the pool clustering mode, the
nodeIDargument must be equal to the node ID of the node the management client directs this method call at, as determined byRhinoHousekeepingMBean.getNodeID(). To query state for another node, a client must connect directly with that node.- Parameters:
id- the component identifier of the Service.nodeID- the node ID of the node to return the Service’s per-node desired state for.- Returns:
- the current per-node desired state of the Service on the specified node, or
nullif no per-node desired state exists. - Throws:
NullPointerException- ifidisnull.InvalidArgumentException- ifnodeIDis an invalid node ID, if the pool clustering mode is being used andnodeIDis not equal to this node’s ID, or if the Service exists but does not have an install level of DEPLOYED.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the state of the Service could not be obtained due to a system-level failure.- Since:
- Rhino 3.0.0
-
getPerNodeDesiredState
ServiceDesiredState[] getPerNodeDesiredState(ServiceID id, int[] nodeIDs) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, ManagementException
Get the current per-node desired state of a Service for each of the specified nodes.
Where per-node state exists for the Service on a specified node then the state contained therein is returned, otherwise a
nullarray entry is returned instead for that node.When using the pool clustering mode, this method can only be used to query the state of the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(). Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To query state for another node, a client must connect directly with that node.- Parameters:
id- the component identifier of the Service.nodeIDs- the node IDs of the nodes to return the Service’s per-node desired state for.- Returns:
- an array of service desired state objects.
This array will be the same length as the supplied
nodeIDsarray, and ifstates = getPerNodeDesiredState(id, nodeIDs)thenstates[i]equals the per-node desired state of the Service on nodenodeIDs[i]. If there is no state information for the Service on a particular node, thennullis returned as the resulting state for the Service on that node. - Throws:
NullPointerException- if either argument isnull.InvalidArgumentException- ifnodeIDsis zero-length or contains invalid node IDs, if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID, or if the Service exists but does not have an install level of DEPLOYED.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the state of the Service could not be obtained due to a system-level failure.- Since:
- Rhino 3.0.0
-
getActualState
ServiceActualState[] getActualState(ServiceID id, int[] nodeIDs) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, ManagementException
Get the current actual state of a Service for each of the specified nodes.
Where per-node state exists for the Service on a target node then the state contained therein is returned, otherwise a
nullarray entry is returned instead for that node.When using the pool clustering mode, this method can only be used to query the state of the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(). Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To query state for another node, a client must connect directly with that node.- Parameters:
id- the component identifier of the Service.nodeIDs- the node IDs of the nodes to return the Service’s actual state for.- Returns:
- an array of service actual state objects.
This array will be the same length as the supplied
nodeIDsarray, and ifstates = getActualState(id, nodeIDs)thenstates[i]equals the actual state of the Service on nodenodeIDs[i]. If there is no state information for the Service on a particular node, thennullis returned as the resulting state for the Service on that node. - Throws:
NullPointerException- if either argument isnull.InvalidArgumentException- ifnodeIDsis zero-length or contains invalid node IDs, if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID, or if the Service exists but does not have an install level of DEPLOYED.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the state of the Service could not be obtained due to a system-level failure.- Since:
- Rhino 3.0.0
-
setPerNodeDesiredState
void setPerNodeDesiredState(ServiceID id, int[] nodeIDs, ServiceDesiredState state) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, ManagementException
Set the per-node desired state for a Service on each of the specified nodes.
When using the pool clustering mode, this method can only be used to affect the state of the node the management client directs this method call at, as determined by
RhinoHousekeepingMBean.getNodeID(). Including the node ID of any other node in thenodeIDsargument will result in anInvalidArgumentExceptionbeing thrown. To manage state for another node in pool mode, a client must connect directly with that node.- Parameters:
id- the component identifier of the Service.nodeIDs- the node IDs of the nodes to set the Service’s per-node desired state for.state- the new desired state for the Service.- Throws:
NullPointerException- if any argument isnull.InvalidArgumentException- ifnodeIDsis zero-length or contains invalid node IDs, or if the pool clustering mode is being used andnodeIDscontains node IDs other than this node’s ID, or if the Service exists but does not have an install level of DEPLOYED.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the state of the Service could not be set due to a system-level failure.- Since:
- Rhino 3.0.0
-
removePerNodeDesiredState
void removePerNodeDesiredState(ServiceID id, int[] nodeIDs) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, ManagementException
Remove the per-node desired state for a Service on each of the specified nodes. This will revert the desired state of the Service 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 Service.
- Parameters:
id- the component identifier of the Service.nodeIDs- the node IDs of the nodes to remove the Service’s per-node desired state for.- Throws:
NullPointerException- if any argument isnull.InvalidArgumentException- ifnodeIDscontains invalid node IDs, or if the Service exists but does not have an install level of DEPLOYED.UnrecognizedServiceException- ifidis not a recognizableServiceIDfor the SLEE or it does not correspond with a Service installed in the SLEE.ManagementException- if the per-node desired state of the Service could not be removed due to a system-level failure.- Since:
- Rhino 3.0.0
-
-