org.jppf.server
Class JPPFDriverStatsUpdater

java.lang.Object
  extended by org.jppf.server.JPPFDriverStatsUpdater
All Implemented Interfaces:
EventListener, JPPFDriverListener

public final class JPPFDriverStatsUpdater
extends Object
implements JPPFDriverListener

Instances of this class are used to collect statistics on the JPPF server.

Author:
Laurent Cohen

Constructor Summary
JPPFDriverStatsUpdater()
           
 
Method Summary
 void clientConnectionClosed()
          Called to notify that a new client has disconnected from he JPPF server.
 int getNbNodes()
          Get the current number of nodes connected to the server.
 JPPFStats getStats()
          Get the stats maintained by this updater.
 void newClientConnection()
          Called to notify that a new client is connected to he JPPF server.
 void newNodeConnection()
          Called to notify that a new node is connected to he JPPF server.
 void nodeConnectionClosed()
          Called to notify that a new node is connected to he JPPF server.
 void reset()
          Notification that a reset of this server's statistics has been requested.
 void taskExecuted(int count, long time, long remoteTime, long size)
          Called when a task execution has completed.
 void taskInQueue(int count)
          Called to notify that a task was added to the queue.
 void taskOutOfQueue(int count, long time)
          Called to notify that a task was removed from the queue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPPFDriverStatsUpdater

public JPPFDriverStatsUpdater()
Method Detail

newClientConnection

public void newClientConnection()
Called to notify that a new client is connected to he JPPF server.

Specified by:
newClientConnection in interface JPPFDriverListener

clientConnectionClosed

public void clientConnectionClosed()
Called to notify that a new client has disconnected from he JPPF server.

Specified by:
clientConnectionClosed in interface JPPFDriverListener

newNodeConnection

public void newNodeConnection()
Called to notify that a new node is connected to he JPPF server.

Specified by:
newNodeConnection in interface JPPFDriverListener

nodeConnectionClosed

public void nodeConnectionClosed()
Called to notify that a new node is connected to he JPPF server.

Specified by:
nodeConnectionClosed in interface JPPFDriverListener

taskInQueue

public void taskInQueue(int count)
Called to notify that a task was added to the queue.

Specified by:
taskInQueue in interface JPPFDriverListener
Parameters:
count - the number of tasks that have been added to the queue.

taskOutOfQueue

public void taskOutOfQueue(int count,
                           long time)
Called to notify that a task was removed from the queue.

Specified by:
taskOutOfQueue in interface JPPFDriverListener
Parameters:
count - the number of tasks that have been removed from the queue.
time - the time the task remained in the queue.

taskExecuted

public void taskExecuted(int count,
                         long time,
                         long remoteTime,
                         long size)
Called when a task execution has completed.

Specified by:
taskExecuted in interface JPPFDriverListener
Parameters:
count - the number of tasks that have been executed.
time - the time it took to execute the task, including transport to and from the node.
remoteTime - the time it took to execute the tasks in the node only.
size - the size in bytes of the bundle that was sent to the node.

getStats

public JPPFStats getStats()
Get the stats maintained by this updater.

Returns:
a JPPFStats instance.

getNbNodes

public int getNbNodes()
Get the current number of nodes connected to the server.

Returns:
the numbe rof nodes as an int.

reset

public void reset()
Notification that a reset of this server's statistics has been requested.

Specified by:
reset in interface JPPFDriverListener


Copyright © 2005-2010 JPPF Team.