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
  • Constructor Details

    • JPPFNodeTaskMonitor

      public JPPFNodeTaskMonitor(org.jppf.node.Node node, String objectName)
      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:
      taskExecuted in interface org.jppf.node.event.TaskExecutionListener
    • taskNotification

      public void taskNotification(org.jppf.node.event.TaskExecutionEvent event)
      Specified by:
      taskNotification in interface org.jppf.node.event.TaskExecutionListener
    • getTotalTasksExecuted

      public Integer getTotalTasksExecuted()
      Get the total number of tasks executed by the node.
      Specified by:
      getTotalTasksExecuted in interface org.jppf.management.JPPFNodeTaskMonitorMBean
      Returns:
      the number of tasks as an integer value.
    • getTotalTaskCpuTime

      public Long getTotalTaskCpuTime()
      The total cpu time used by the tasks in milliseconds.
      Specified by:
      getTotalTaskCpuTime in interface org.jppf.management.JPPFNodeTaskMonitorMBean
      Returns:
      the cpu time as long value.
    • getTotalTaskElapsedTime

      public Long getTotalTaskElapsedTime()
      The total elapsed time used by the tasks in milliseconds.
      Specified by:
      getTotalTaskElapsedTime in interface org.jppf.management.JPPFNodeTaskMonitorMBean
      Returns:
      the elapsed time as long value.
    • getTotalTasksInError

      public Integer getTotalTasksInError()
      The total number of tasks that ended in error.
      Specified by:
      getTotalTasksInError in interface org.jppf.management.JPPFNodeTaskMonitorMBean
      Returns:
      the number as an integer value.
    • getTotalTasksSucessfull

      public Integer getTotalTasksSucessfull()
      The total number of tasks that executed successfully.
      Specified by:
      getTotalTasksSucessfull in interface org.jppf.management.JPPFNodeTaskMonitorMBean
      Returns:
      the number as an integer value.
    • reset

      public void reset()
      Specified by:
      reset in interface org.jppf.management.JPPFNodeTaskMonitorMBean
    • addNotificationListener

      public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
      Specified by:
      addNotificationListener in interface NotificationBroadcaster
      Overrides:
      addNotificationListener in class NotificationBroadcasterSupport
    • removeNotificationListener

      public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException
      Specified by:
      removeNotificationListener in interface NotificationBroadcaster
      Overrides:
      removeNotificationListener in class NotificationBroadcasterSupport
      Throws:
      ListenerNotFoundException
    • removeNotificationListener

      public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException
      Specified by:
      removeNotificationListener in interface NotificationEmitter
      Overrides:
      removeNotificationListener in class NotificationBroadcasterSupport
      Throws:
      ListenerNotFoundException