Package org.jppf.management
Interface JPPFDriverAdminMBean
- All Superinterfaces:
JPPFAdminMBean,Serializable
- All Known Implementing Classes:
JMXDriverConnectionWrapper
MBean interface for the management of a JPPF driver.
- Author:
- Laurent Cohen
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionchangeLoadBalancerSettings(String algorithm, Map<Object, Object> parameters) Change the bundle size tuning settings.getActiveState(NodeSelector selector) Get the active states of the nodes specified vith aNodeSelector.booleanDetermine whether the driver is broadcasting or not.Request the JMX connection information for all the idle nodes attached to the server.idleNodesInformation(NodeSelector selector) Request the JMX connection information for all the idle nodes attached to the server which satisfy the specified selector.Obtain the current load-balancing settings.Get the number of nodes currently idle.nbIdleNodes(NodeSelector selector) Get the number of idle nodes attached to the driver that satisfy the specified selector.nbIdleNodes(NodeSelector selector, boolean includePeers) Get the number of idle nodes attached to the driver that satisfy the specified selector.nbNodes()Get the number of nodes attached to the driver.nbNodes(NodeSelector selector) Get the number of nodes attached to the driver that satisfy the specified selector.Request the JMX connection information for all the nodes attached to the server.nodesInformation(NodeSelector selector) Request the JMX connection information for all the nodes attached to the server which satisfy the specified selector.nodesInformation(NodeSelector selector, boolean includePeers) Request the JMX connection information for all the nodes attached to the server which satisfy the specified selector.voidReset this server's statistics.restartShutdown(Long shutdownDelay, Long restartDelay) Perform a shutdown or restart of the server.voidsetActiveState(NodeSelector selector, boolean active) Set the active state of the specified nodes.voidsetBroadcasting(boolean broadcasting) Activate or deactivate the broadcasting of the driver's connection information.Get the latest statistics snapshot from the JPPF driver.voidtoggleActiveState(NodeSelector selector) Toggle the activate state of the specified nodes.Methods inherited from interface org.jppf.management.JPPFAdminMBean
systemInformation
-
Field Details
-
MBEAN_NAME
Name of the driver's admin MBean.- See Also:
-
-
Method Details
-
statistics
Get the latest statistics snapshot from the JPPF driver.- Returns:
- a
JPPFStatisticsinstance. - Throws:
Exception- if any error occurs.
-
nbNodes
Get the number of nodes attached to the driver. Note that this method is equivalent to callingnbNodes(null).- Returns:
- the number of nodes, or -1 if information on the nodes could not be retrieved. The returned number does not include peer drivers.
- Throws:
Exception- if any error occurs.
-
nbNodes
Get the number of nodes attached to the driver that satisfy the specified selector.- Parameters:
selector- specifies which nodes shouyld be counted. If null, thenNodeSelector.ALL_NODESwill be used.- Returns:
- the number of nodes, or -1 if information on the nodes could not be retrieved. The returned number does not include peer drivers.
- Throws:
Exception- if any error occurs.- Since:
- 5.0
-
nodesInformation
Request the JMX connection information for all the nodes attached to the server. Note that this method is equivalent to callingnodesInformation(null, false).- Returns:
- a collection of
JPPFManagementInfoinstances, ornullif information on the nodes could not be retrieved. - Throws:
Exception- if any error occurs.
-
nodesInformation
Request the JMX connection information for all the nodes attached to the server which satisfy the specified selector. Note that this method is equivalent to callingnodesInformation(selector, false).- Parameters:
selector- specifies which nodes shouyld be counted. Ifnull, thenNodeSelector.ALL_NODESwill be used.- Returns:
- a collection of
JPPFManagementInfoinstances, ornullif information on the nodes could not be retrieved. - Throws:
Exception- if any error occurs.
-
nodesInformation
Collection<JPPFManagementInfo> nodesInformation(NodeSelector selector, boolean includePeers) throws Exception Request the JMX connection information for all the nodes attached to the server which satisfy the specified selector.- Parameters:
selector- specifies which nodes shouyld be counted. Ifnull, thenNodeSelector.ALL_NODESwill be used.includePeers- whether peer drivers should be counted as nodes and included.- Returns:
- a collection of
JPPFManagementInfoinstances, ornullif information on the nodes could not be retrieved. - Throws:
Exception- if any error occurs.
-
restartShutdown
Perform a shutdown or restart of the server.- Parameters:
shutdownDelay- the delay before shutting down the server, once the command is received.restartDelay- the delay before restarting, once the server is shutdown. If it is < 0, no restart occurs.- Returns:
- an acknowledgement message.
- Throws:
Exception- if any error occurs.
-
changeLoadBalancerSettings
Change the bundle size tuning settings.- Parameters:
algorithm- the name opf the load-balancing algorithm to set.parameters- the algorithm's parameters.- Returns:
- an acknowledgement or error message.
- Throws:
Exception- if an error occurred while updating the settings.
-
loadBalancerInformation
Obtain the current load-balancing settings.- Returns:
- an instance of
LoadBalancingInformation. - Throws:
Exception- if an error occurred while fetching the settings.
-
resetStatistics
Reset this server's statistics. This method triggers areset()event via theJPPFDriverStatsManagerinstance.- Throws:
Exception- if any error occurs.
-
nbIdleNodes
Get the number of nodes currently idle. Note that this method is equivalent to callingnbIdleNodes(null).- Returns:
- the number of idle nodes, or -1 if information on the nodes could not be retrieved. The returned number does not include peer drivers.
- Throws:
Exception- if any error occurs.
-
nbIdleNodes
Get the number of idle nodes attached to the driver that satisfy the specified selector.- Parameters:
selector- specifies which nodes should be counted. Ifnull, thenNodeSelector.ALL_NODESwill be used.- Returns:
- the number of idle nodes, or -1 if information on the nodes could not be retrieved. The returned number does not include peer drivers.
- Throws:
Exception- if any error occurs.- Since:
- 5.0
-
nbIdleNodes
Get the number of idle nodes attached to the driver that satisfy the specified selector.- Parameters:
selector- specifies which nodes should be counted. Ifnull, thenNodeSelector.ALL_NODESwill be used.includePeers- whether peer drivers should be counted as nodes and included.- Returns:
- the number of idle nodes, or -1 if information on the nodes could not be retrieved. The returned number does not include peer drivers.
- Throws:
Exception- if any error occurs.- Since:
- 5.0
-
idleNodesInformation
Request the JMX connection information for all the idle nodes attached to the server. Note that this method is equivalent to callingidleNodesInformation(null).- Returns:
- a collection of
JPPFManagementInfoinstances, ornullif information on the nodes could not be retrieved. - Throws:
Exception- if any error occurs.
-
idleNodesInformation
Request the JMX connection information for all the idle nodes attached to the server which satisfy the specified selector.- Parameters:
selector- specifies which nodes shouyld be counted. Ifnull, thenNodeSelector.ALL_NODESwill be used.- Returns:
- a collection of
JPPFManagementInfoinstances, ornullif information on the nodes could not be retrieved. - Throws:
Exception- if any error occurs.
-
toggleActiveState
Toggle the activate state of the specified nodes. Nodes in 'active' state will be deactivated, nodes in 'inactive' state will be activated.- Parameters:
selector- determines which nodes will be activated or deactivated. Ifnull, thenNodeSelector.ALL_NODESwill be used.- Throws:
Exception- if any error occurs.
-
getActiveState
Get the active states of the nodes specified vith aNodeSelector.- Parameters:
selector- specifies for which nodes to retrieve the active states. Ifnull, thenNodeSelector.ALL_NODESwill be used.- Returns:
- a mmaping of node uuids to their active state.
- Throws:
Exception- if any error occurs.
-
setActiveState
Set the active state of the specified nodes.- Parameters:
selector- determines which nodes will be activated or deactivated. Ifnull, thenNodeSelector.ALL_NODESwill be used.active- specifies the activer state to set on the selected nodes.- Throws:
Exception- if any error occurs.
-
setBroadcasting
Activate or deactivate the broadcasting of the driver's connection information. if the broadcast is already in the desired state, this method has no effect.- Parameters:
broadcasting-trueto activate the broadcast,falseto deactivate it.- Throws:
Exception- if any error occurs.
-
getBroadcasting
Determine whether the driver is broadcasting or not.- Returns:
trueif the broadcasting service is on,falseif it is off.- Throws:
Exception- if any error occurs.
-