org.jppf.management
Class JPPFNodeState

java.lang.Object
  extended by org.jppf.management.JPPFNodeState
All Implemented Interfaces:
Serializable

public class JPPFNodeState
extends Object
implements 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:
Serialized Form

Constructor Summary
JPPFNodeState()
           
 
Method Summary
 JPPFNodeState copy()
          Make a copy of this node state.
 Set<String> getAllTaskIds()
          Get the ids of all currently executing tasks.
 String getConnectionStatus()
          Get the status of the connection between the node and the server.
 long getCpuTime()
          Get the total cpu time used by the task processing threads.
 String getExecutionStatus()
          Get the latest execution status of the node.
 int getNbTasksExecuted()
          Get the number of tasks executed by the node.
 Serializable getTaskNotification()
          Get the latest event received from a task.
 int getThreadPoolSize()
          Get the size of the node's thread pool.
 int getThreadPriority()
          Get the priority of the threads in the pool.
 void setConnectionStatus(String connectionStatus)
          Set the status of the connection between the node and the server.
 void setCpuTime(long cpuTime)
          Set the total cpu time used by the task processing threads.
 void setExecutionStatus(String executionStatus)
          Get the latest execution status of the node.
 void setNbTasksExecuted(int nbTasksExecuted)
          Set the number of tasks executed by the node.
 void setTaskEvent(Serializable taskEvent)
          Set the latest event received from a task.
 void setTaskIdSet(Set<String> taskIdSet)
          Set the ids of all currently executing tasks.
 void setThreadPoolSize(int threadPoolSize)
          Set the size of the node's thread pool.
 void setThreadPriority(int threadPriority)
          Set the priority of the threads in the pool.
 void taskEnded(String id)
          Notification that a task with the specified id has ended.
 void taskStarted(String id)
          Notification that a task with the specified id has started.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPPFNodeState

public JPPFNodeState()
Method Detail

getTaskNotification

public Serializable getTaskNotification()
Get the latest event received from a task.

Returns:
the event as an object.

setTaskEvent

public void setTaskEvent(Serializable taskEvent)
Set the latest event received from a task.

Parameters:
taskEvent - the event as an object.

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

public String getConnectionStatus()
Get the status of the connection between the node and the server.

Returns:
a string representing the connection status.

setConnectionStatus

public void setConnectionStatus(String connectionStatus)
Set the status of the connection between the node and the server.

Parameters:
connectionStatus - a string representing the connection status.

getExecutionStatus

public String getExecutionStatus()
Get the latest execution status of the node.

Returns:
a string representing the execution status.

setExecutionStatus

public void setExecutionStatus(String executionStatus)
Get the latest execution status of the node.

Parameters:
executionStatus - a string representing the execution status.

taskStarted

public void taskStarted(String id)
Notification that a task with the specified id has started.

Parameters:
id - the id of the task.

taskEnded

public void taskEnded(String id)
Notification that a task with the specified id has ended.

Parameters:
id - the id of the task.

getAllTaskIds

public Set<String> getAllTaskIds()
Get the ids of all currently executing tasks.

Returns:
the ids as a set of strings.

setTaskIdSet

public void setTaskIdSet(Set<String> taskIdSet)
Set the ids of all currently executing tasks.

Parameters:
taskIdSet - the ids as a set of strings.

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.

copy

public JPPFNodeState copy()
Make a copy of this node state.

Returns:
a JPPFNodeState instance.


Copyright © 2005-2010 JPPF Team.