org.objectweb.cjdbc.controller.virtualdatabase
Class VirtualDatabaseWorkerThread

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabaseWorkerThread
All Implemented Interfaces:
java.lang.Runnable

public class VirtualDatabaseWorkerThread
extends java.lang.Thread

The VirtualDatabaseWorkerThread handles a connection with a C-JDBC driver.

Version:
1.0
Author:
Emmanuel Cecchet, Nicolas Modrzyk

Field Summary
private  CommandCompleted completed
           
private  boolean isKilled
          true ifthis has been killed.
private  Trace logger
          Logger instance.
private static int STREAM_GC_LIMIT
          How many objects can be sent before resetting the output stream to allow those objects to be garbage collected.
private  VirtualDatabase vdb
          Virtual database instantiating this thread.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
VirtualDatabaseWorkerThread(VirtualDatabase vdb)
          Creates a new VirtualDatabaseWorkerThread instance.
 
Method Summary
 void run()
          Gets a connection from the connection queue and process it.
 void shutdown()
          Shutdown this thread by setting isKilled value to true.
 
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

STREAM_GC_LIMIT

private static final int STREAM_GC_LIMIT
How many objects can be sent before resetting the output stream to allow those objects to be garbage collected.

See Also:
Constant Field Values

isKilled

private boolean isKilled
true ifthis has been killed.


vdb

private VirtualDatabase vdb
Virtual database instantiating this thread.


completed

private final CommandCompleted completed

logger

private Trace logger
Logger instance.

Constructor Detail

VirtualDatabaseWorkerThread

public VirtualDatabaseWorkerThread(VirtualDatabase vdb)
Creates a new VirtualDatabaseWorkerThread instance.

Parameters:
vdb - the virtual database instantiating this thread.
Method Detail

shutdown

public void shutdown()
Shutdown this thread by setting isKilled value to true. This gives time to check for needed rollback transactions


run

public void run()
Gets a connection from the connection queue and process it.



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