|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.objectweb.cjdbc.controller.recoverylog.JDBCLoggerThread
Logger thread for the JDBCRecoveryLog.
Nested Class Summary | |
private class |
JDBCLoggerThread.LogObject
|
Field Summary | |
private boolean |
killed
|
private Trace |
logger
|
private java.util.ArrayList |
logQueue
|
private java.sql.PreparedStatement |
pstmt
|
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
JDBCLoggerThread(java.sql.PreparedStatement pstmt,
Trace logger)
Create a new JDBCLoggerThread |
Method Summary | |
boolean |
getLogQueueIsEmpty()
Tells whether there are pending logs |
void |
log(long id,
java.lang.String login,
java.lang.String query,
long tid,
boolean escapeProcessing)
Log a query. |
void |
removeQueriesOfTransactionFromQueue(long tid)
Remove all queries that have not been logged yet and belonging to the specified transaction. |
void |
rollbackTransactions()
Roll back all unfinished transactions. |
void |
run()
Log the requests from queue until the thread is explicetly killed. |
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 boolean killed
private java.util.ArrayList logQueue
private java.sql.PreparedStatement pstmt
private Trace logger
Constructor Detail |
public JDBCLoggerThread(java.sql.PreparedStatement pstmt, Trace logger)
pstmt
- the PreparedStatement to use to log the requestslogger
- where to log error messagesMethod Detail |
public void log(long id, java.lang.String login, java.lang.String query, long tid, boolean escapeProcessing)
id
- unique request idlogin
- login used for this requestquery
- query to logtid
- transaction id of this requestescapeProcessing
- true if escape processing must be donepublic void rollbackTransactions()
public void removeQueriesOfTransactionFromQueue(long tid)
tid
- transaction id to rollbackpublic boolean getLogQueueIsEmpty()
public void run()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |