|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
com.partnersoft.gadgets.LoopingThread
com.partnersoft.sql.SqlConnectionKeepAlive
public class SqlConnectionKeepAlive
A looping thread that keeps an SQL connection alive by doing a small operation every so often.
Needing this is probably an indication of a bad design, but if you don't have time to fix the design, this might be very useful.
Copyright 2010 Partner Software, Inc.
| 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 | |
|---|---|
SqlConnectionKeepAlive(java.sql.Connection connection)
Starts an keep-alive thread with a 1-hour loop interval. |
|
SqlConnectionKeepAlive(java.sql.Connection connection,
Duration interval)
|
|
SqlConnectionKeepAlive(SqlConnection connection)
Starts an keep-alive thread with a 1-hour loop interval. |
|
SqlConnectionKeepAlive(SqlConnection connection,
Duration interval)
|
|
| Method Summary | |
|---|---|
void |
runTask()
By default, this runs the runnable. |
| Methods inherited from class com.partnersoft.gadgets.LoopingThread |
|---|
getInterval, getTask, isRunning, pauseLooping, resumeLooping, run, setInterval, setTask, start, stopRunning |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, 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, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SqlConnectionKeepAlive(SqlConnection connection,
Duration interval)
public SqlConnectionKeepAlive(java.sql.Connection connection,
Duration interval)
public SqlConnectionKeepAlive(SqlConnection connection)
public SqlConnectionKeepAlive(java.sql.Connection connection)
| Method Detail |
|---|
public void runTask()
throws java.lang.Exception
LoopingThread
runTask in class LoopingThreadjava.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||