Package org.jppf.management
Class JPPFNodeAdmin
java.lang.Object
org.jppf.management.JPPFNodeAdmin
- All Implemented Interfaces:
Serializable,org.jppf.management.JPPFAdminMBean,org.jppf.management.JPPFNodeAdminMBean
Management bean for a JPPF node.
- Author:
- Laurent Cohen
- See Also:
-
Field Summary
Fields inherited from interface org.jppf.management.JPPFNodeAdminMBean
MBEAN_NAME -
Constructor Summary
ConstructorsConstructorDescriptionJPPFNodeAdmin(org.jppf.server.node.JPPFNode node) Initialize this node management bean with the specified node. -
Method Summary
Modifier and TypeMethodDescriptionvoidCancel the job with the specified id.booleanorg.jppf.classloader.DelegationModelorg.jppf.management.NodePendingActionGet the current state of the nodevoidvoidReset the node's executed tasks counter to zero.voidrestart()Restart the node.voidvoidsetDelegationModel(org.jppf.classloader.DelegationModel model) voidSet the node's executed tasks counter to the specified value.voidshutdown()Shutdown the node.voidorg.jppf.management.JPPFNodeStatestate()Get the latest state information from the node.org.jppf.management.JPPFSystemInformationGet detailed information about the node's JVM properties, environment variables and runtime information such as memory usage and available processors.voidupdateConfiguration(Map<Object, Object> configOverrides, Boolean restart) Update the configuration properties of the node.voidupdateConfiguration(Map<Object, Object> configOverrides, Boolean restart, Boolean interruptIfRunning) Update the configuration properties of the node.voidupdateThreadPoolSize(Integer size) Set the size of the node's thread pool.voidupdateThreadsPriority(Integer newPriority) Update the priority of all execution threads.
-
Constructor Details
-
JPPFNodeAdmin
public JPPFNodeAdmin(org.jppf.server.node.JPPFNode node) Initialize this node management bean with the specified node.- Parameters:
node- the node whose state is monitored.
-
-
Method Details
-
state
Get the latest state information from the node.- Specified by:
statein interfaceorg.jppf.management.JPPFNodeAdminMBean- Returns:
- a
JPPFNodeStateinformation. - Throws:
Exception- if any error occurs.
-
updateThreadPoolSize
Set the size of the node's thread pool.- Specified by:
updateThreadPoolSizein interfaceorg.jppf.management.JPPFNodeAdminMBean- Parameters:
size- the size as an int.- Throws:
Exception- if any error occurs.
-
systemInformation
Get detailed information about the node's JVM properties, environment variables and runtime information such as memory usage and available processors.- Specified by:
systemInformationin interfaceorg.jppf.management.JPPFAdminMBean- Returns:
- a
JPPFSystemInformationinstance. - Throws:
Exception- if any error occurs.
-
restart
Restart the node.- Specified by:
restartin interfaceorg.jppf.management.JPPFNodeAdminMBean- Throws:
Exception- if any error occurs.
-
restart
- Specified by:
restartin interfaceorg.jppf.management.JPPFNodeAdminMBean- Throws:
Exception- Since:
- 5.0
-
shutdown
Shutdown the node.- Specified by:
shutdownin interfaceorg.jppf.management.JPPFNodeAdminMBean- Throws:
Exception- if any error occurs.
-
shutdown
- Specified by:
shutdownin interfaceorg.jppf.management.JPPFNodeAdminMBean- Throws:
Exception- Since:
- 5.0
-
reconnect
- Specified by:
reconnectin interfaceorg.jppf.management.JPPFNodeAdminMBean- Throws:
Exception
-
resetTaskCounter
Reset the node's executed tasks counter to zero.- Specified by:
resetTaskCounterin interfaceorg.jppf.management.JPPFNodeAdminMBean- Throws:
Exception- if any error occurs.
-
setTaskCounter
Set the node's executed tasks counter to the specified value.- Specified by:
setTaskCounterin interfaceorg.jppf.management.JPPFNodeAdminMBean- Parameters:
n- the new value of the task counter.- Throws:
Exception- if any error occurs.
-
updateThreadsPriority
Update the priority of all execution threads.- Specified by:
updateThreadsPriorityin interfaceorg.jppf.management.JPPFNodeAdminMBean- Parameters:
newPriority- the new priority to set.- Throws:
Exception- if any error occurs.
-
updateConfiguration
public void updateConfiguration(Map<Object, Object> configOverrides, Boolean restart, Boolean interruptIfRunning) throws ExceptionUpdate the configuration properties of the node.- Specified by:
updateConfigurationin interfaceorg.jppf.management.JPPFNodeAdminMBean- Parameters:
configOverrides- the set of properties to update.restart- specifies whether the node should reconnect ot the driver after updating the properties.interruptIfRunning- whentrue, then restart the node even if it is executing tasks, whenfalse, then only shutdown the node when it is no longer executing. This parameter only applies when therestartparameter istrue.- Throws:
Exception- if any error occurs.- Since:
- 5.2
-
updateConfiguration
public void updateConfiguration(Map<Object, Object> configOverrides, Boolean restart) throws ExceptionUpdate the configuration properties of the node. This method is equivalent to callingupdateConfiguration(configOverrides, restart, true).- Specified by:
updateConfigurationin interfaceorg.jppf.management.JPPFNodeAdminMBean- Parameters:
configOverrides- the set of properties to update.restart- specifies whether the node should be restarted after updating the properties. This parameter only applies when therestartparameter istrue.- Throws:
Exception- if any error occurs.
-
cancelJob
Cancel the job with the specified id.- Specified by:
cancelJobin interfaceorg.jppf.management.JPPFNodeAdminMBean- Parameters:
jobId- the id of the job to cancel.requeue- true if the job should be requeued on the server side, false otherwise.- Throws:
Exception- if any error occurs.
-
getDelegationModel
- Specified by:
getDelegationModelin interfaceorg.jppf.management.JPPFNodeAdminMBean- Throws:
Exception
-
setDelegationModel
- Specified by:
setDelegationModelin interfaceorg.jppf.management.JPPFNodeAdminMBean- Throws:
Exception
-
pendingAction
public org.jppf.management.NodePendingAction pendingAction()Get the current state of the node- Specified by:
pendingActionin interfaceorg.jppf.management.JPPFNodeAdminMBean- Returns:
- a
JPPFNodeStateinstance.
-
cancelPendingAction
public boolean cancelPendingAction()- Specified by:
cancelPendingActionin interfaceorg.jppf.management.JPPFNodeAdminMBean
-