org.objectweb.cjdbc.requestplayer
Class MonitoringThread

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.objectweb.cjdbc.requestplayer.MonitoringThread
All Implemented Interfaces:
java.lang.Runnable

public class MonitoringThread
extends java.lang.Thread

Displays the number of requests processed at a given time period.

Version:
1.0
Author:
Emmanuel Cecchet

Field Summary
private  Stats deleteStats
          Number of delete requests.
private  Stats insertStats
          Number of insert requests.
private  boolean killed
          true if this thread has been killed.
private  Stats selectStats
          Number of read requests.
private  long timeInMs
          Time to wait between 2 outputs in milleseconds.
private  Stats unknownStats
          Number of unknown requests.
private  Stats updateStats
          Number of update requests.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MonitoringThread(ClientEmulator father, long timeInMs)
          Creates a new MonitoringThread.
 
Method Summary
 boolean isKilled()
          Returns true if this thread has been killed.
 void run()
           
 void setKilled(boolean killed)
          Used to stop the execution of this thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

selectStats

private Stats selectStats
Number of read requests.


unknownStats

private Stats unknownStats
Number of unknown requests.


updateStats

private Stats updateStats
Number of update requests.


insertStats

private Stats insertStats
Number of insert requests.


deleteStats

private Stats deleteStats
Number of delete requests.


timeInMs

private long timeInMs
Time to wait between 2 outputs in milleseconds.


killed

private boolean killed
true if this thread has been killed.

Constructor Detail

MonitoringThread

public MonitoringThread(ClientEmulator father,
                        long timeInMs)
Creates a new MonitoringThread.

Parameters:
father - the client emulator.
timeInMs - the time to wait between 2 outputs in milleseconds.
Method Detail

run

public void run()
See Also:
Runnable.run()

isKilled

public boolean isKilled()
Returns true if this thread has been killed.

Returns:
a boolean

setKilled

public void setKilled(boolean killed)
Used to stop the execution of this thread.

Parameters:
killed - boolean.


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.