Package org.jppf.management
Class JPPFNodeTaskMonitor
java.lang.Object
javax.management.NotificationBroadcasterSupport
org.jppf.management.JPPFNodeTaskMonitor
- All Implemented Interfaces:
EventListener,NotificationBroadcaster,NotificationEmitter,org.jppf.management.JPPFNodeTaskMonitorMBean,org.jppf.node.event.TaskExecutionListener
public class JPPFNodeTaskMonitor
extends NotificationBroadcasterSupport
implements org.jppf.management.JPPFNodeTaskMonitorMBean, org.jppf.node.event.TaskExecutionListener
MBean implementation for task-level monitoring on each node.
- Author:
- Laurent Cohen
-
Field Summary
Fields inherited from interface org.jppf.management.JPPFNodeTaskMonitorMBean
MBEAN_NAME -
Constructor Summary
ConstructorsConstructorDescriptionJPPFNodeTaskMonitor(org.jppf.node.Node node, String objectName) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) The total cpu time used by the tasks in milliseconds.The total elapsed time used by the tasks in milliseconds.Get the total number of tasks executed by the node.The total number of tasks that ended in error.The total number of tasks that executed successfully.voidvoidremoveNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) voidreset()voidtaskExecuted(org.jppf.node.event.TaskExecutionEvent event) voidtaskNotification(org.jppf.node.event.TaskExecutionEvent event) Methods inherited from class javax.management.NotificationBroadcasterSupport
getNotificationInfo, handleNotification, sendNotificationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.management.NotificationBroadcaster
getNotificationInfo
-
Constructor Details
-
JPPFNodeTaskMonitor
Default constructor.- Parameters:
node- the jppf node which hosts this mbean.objectName- a string representing the MBean object name.
-
-
Method Details
-
taskExecuted
public void taskExecuted(org.jppf.node.event.TaskExecutionEvent event) - Specified by:
taskExecutedin interfaceorg.jppf.node.event.TaskExecutionListener
-
taskNotification
public void taskNotification(org.jppf.node.event.TaskExecutionEvent event) - Specified by:
taskNotificationin interfaceorg.jppf.node.event.TaskExecutionListener
-
getTotalTasksExecuted
Get the total number of tasks executed by the node.- Specified by:
getTotalTasksExecutedin interfaceorg.jppf.management.JPPFNodeTaskMonitorMBean- Returns:
- the number of tasks as an integer value.
-
getTotalTaskCpuTime
The total cpu time used by the tasks in milliseconds.- Specified by:
getTotalTaskCpuTimein interfaceorg.jppf.management.JPPFNodeTaskMonitorMBean- Returns:
- the cpu time as long value.
-
getTotalTaskElapsedTime
The total elapsed time used by the tasks in milliseconds.- Specified by:
getTotalTaskElapsedTimein interfaceorg.jppf.management.JPPFNodeTaskMonitorMBean- Returns:
- the elapsed time as long value.
-
getTotalTasksInError
The total number of tasks that ended in error.- Specified by:
getTotalTasksInErrorin interfaceorg.jppf.management.JPPFNodeTaskMonitorMBean- Returns:
- the number as an integer value.
-
getTotalTasksSucessfull
The total number of tasks that executed successfully.- Specified by:
getTotalTasksSucessfullin interfaceorg.jppf.management.JPPFNodeTaskMonitorMBean- Returns:
- the number as an integer value.
-
reset
public void reset()- Specified by:
resetin interfaceorg.jppf.management.JPPFNodeTaskMonitorMBean
-
addNotificationListener
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) - Specified by:
addNotificationListenerin interfaceNotificationBroadcaster- Overrides:
addNotificationListenerin classNotificationBroadcasterSupport
-
removeNotificationListener
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException - Specified by:
removeNotificationListenerin interfaceNotificationBroadcaster- Overrides:
removeNotificationListenerin classNotificationBroadcasterSupport- Throws:
ListenerNotFoundException
-
removeNotificationListener
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException - Specified by:
removeNotificationListenerin interfaceNotificationEmitter- Overrides:
removeNotificationListenerin classNotificationBroadcasterSupport- Throws:
ListenerNotFoundException
-