|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.objectweb.cjdbc.requestplayer.ClientThread
C-JDBC client emulator worker thread. Reads SQL requests in a file and forwards them to the cache. If the cache returns no reply, this class forwards the request to the database. Then it returns the reply and updates the cache if needed.
Field Summary | |
private Stats |
beginStats
Number of transaction begin. |
private Stats |
closeStats
Statistics about closing a connection |
private Stats |
commitStats
Number of transaction commit. |
private java.sql.Connection |
conn
|
private int |
connectionType
Type of connection management: standard, fixed or pooling |
private static boolean |
DEBUG
Debug on standard output. |
private Stats |
deleteStats
Number of delete requests. |
private ClientEmulator |
father
|
private Stats |
getConnectionStats
Statistics about get connection from driver |
private Stats |
getRequestStats
Statistics about getting request from the log file |
private Stats |
insertStats
Number of insert requests. |
private Stats |
rollbackStats
Number of transaction rollback. |
private Stats |
selectStats
Number of read requests. |
private int |
threadId
|
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 | |
ClientThread(int threadId,
ClientEmulator father,
int connectionType)
Creates a new ClientThread instance. |
Method Summary | |
private void |
closeConnection()
Closes the connection to the database. |
private void |
execReadRequest(java.lang.String req)
Executes a select request. |
private void |
execWriteRequest(java.lang.String req)
Executes a write request. |
private java.sql.Connection |
getConnection()
Gets a new connection to the database. |
void |
run()
|
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 |
private static final boolean DEBUG
private Stats selectStats
private Stats unknownStats
private Stats updateStats
private Stats insertStats
private Stats deleteStats
private Stats beginStats
private Stats commitStats
private Stats rollbackStats
private Stats getConnectionStats
private Stats closeStats
private Stats getRequestStats
private java.sql.Connection conn
private ClientEmulator father
private int threadId
private int connectionType
Constructor Detail |
public ClientThread(int threadId, ClientEmulator father, int connectionType)
ClientThread
instance.
threadId
- thread idfather
- father client emulatorconnectionType
- connection typeMethod Detail |
public void run()
Runnable.run()
private void execWriteRequest(java.lang.String req)
req
- request to executeprivate void execReadRequest(java.lang.String req)
req
- request to executeprivate void closeConnection()
private java.sql.Connection getConnection()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |