|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
com.splout.db.common.TimeoutThread
public class TimeoutThread
A Thread that is in charge of killing long-running queries.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
TimeoutThread(long timeout)
|
|
| Method Summary | |
|---|---|
void |
endQuery(com.almworks.sqlite4java.SQLiteConnection connection)
The same Thread that provided this connection in startQuery() removes it from the monitoring list. |
void |
run()
|
void |
startQuery(com.almworks.sqlite4java.SQLiteConnection connection,
java.lang.String query)
A Thread provides its thread-local connection to be monitored when a query starts. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TimeoutThread(long timeout)
timeout - The timeout in milliseconds. If a SQLite connection monitored by this Thread has a query that runs for
more than this, it will be interrupted and the query will return an error.| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
public void startQuery(com.almworks.sqlite4java.SQLiteConnection connection,
java.lang.String query)
public void endQuery(com.almworks.sqlite4java.SQLiteConnection connection)
SQLite4JavaManager behaves like this.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||