Package org.jppf.management
Class JPPFNodeState
java.lang.Object
org.jppf.management.JPPFNodeState
- All Implemented Interfaces:
Serializable
Instances of this class represent the state of a node.
They are used as the result of node JMX monitoring request.
- Author:
- Laurent Cohen
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of connection states.static enumEnumeration of execution states. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Make a copy of this node state.booleanGet the status of the connection between the node and the server.longGet the total cpu time used by the task processing threads.Get the latest execution status of the node.intGet the number of tasks executed by the node.Get the current pending action for the node.intGet the size of the node's thread pool.intGet the priority of the threads in the pool.inthashCode()voidsetConnectionStatus(JPPFNodeState.ConnectionState connectionStatus) Set the status of the connection between the node and the server.voidsetCpuTime(long cpuTime) Set the total cpu time used by the task processing threads.voidsetExecutionStatus(JPPFNodeState.ExecutionState executionStatus) Get the latest execution status of the node.voidsetNbTasksExecuted(int nbTasksExecuted) Set the number of tasks executed by the node.voidsetPendingAction(NodePendingAction pendingAction) Set the current pending action for the node.voidsetThreadPoolSize(int threadPoolSize) Set the size of the node's thread pool.voidsetThreadPriority(int threadPriority) Set the priority of the threads in the pool.toString()
-
Constructor Details
-
JPPFNodeState
public JPPFNodeState()
-
-
Method Details
-
getNbTasksExecuted
public int getNbTasksExecuted()Get the number of tasks executed by the node.- Returns:
- the number of tasks as an int.
-
setNbTasksExecuted
public void setNbTasksExecuted(int nbTasksExecuted) Set the number of tasks executed by the node.- Parameters:
nbTasksExecuted- the number of tasks as an int.
-
getConnectionStatus
Get the status of the connection between the node and the server.- Returns:
- the connection status.
-
setConnectionStatus
Set the status of the connection between the node and the server.- Parameters:
connectionStatus- the connection status.
-
getExecutionStatus
Get the latest execution status of the node.- Returns:
- the execution status.
-
setExecutionStatus
Get the latest execution status of the node.- Parameters:
executionStatus- the execution status.
-
getThreadPoolSize
public int getThreadPoolSize()Get the size of the node's thread pool.- Returns:
- the size as an int.
-
setThreadPoolSize
public void setThreadPoolSize(int threadPoolSize) Set the size of the node's thread pool.- Parameters:
threadPoolSize- the size as an int.
-
getCpuTime
public long getCpuTime()Get the total cpu time used by the task processing threads.- Returns:
- the cpu time in milliseconds.
-
setCpuTime
public void setCpuTime(long cpuTime) Set the total cpu time used by the task processing threads.- Parameters:
cpuTime- the cpu time in milliseconds.
-
getThreadPriority
public int getThreadPriority()Get the priority of the threads in the pool.- Returns:
- the priority as an int value.
-
setThreadPriority
public void setThreadPriority(int threadPriority) Set the priority of the threads in the pool.- Parameters:
threadPriority- the priority as an int value.
-
getPendingAction
Get the current pending action for the node.- Returns:
- a
NodePendingActionenum element.
-
setPendingAction
Set the current pending action for the node.- Parameters:
pendingAction- aNodePendingActionenum element.
-
copy
Make a copy of this node state.- Returns:
- a
JPPFNodeStateinstance.
-
toString
-
hashCode
public int hashCode() -
equals
-