|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object biz.chitec.quarterback.util.DBWakeupToggler
Sends from time to time request to database connections to prevent them from being closed. Used by its statis methods attach() and remove(). Keeps some Threads internally but generally takes great care not to use too much resources.
Nested Class Summary | |
private static class |
DBWakeupToggler.ListContent
Content of the internal connection list. |
Field Summary | |
private java.util.List |
connections
|
private static java.util.Map |
conntotoggler
|
private static int |
counter
|
static long |
DEFAULTIDLETIME
Default idle time is seven hours, which is exactly one hour less than MySQL's close time |
static java.lang.String |
DEFAULTQUERY
This useless query works for MySQL. |
private java.lang.Thread |
handleThread
|
private java.util.List |
newconnections
|
private long |
nextruntime
|
private java.util.List |
removeconnections
|
private long |
sleeprest
|
private long |
sleeptime
|
private static java.util.Map |
togglers
|
Constructor Summary | |
private |
DBWakeupToggler()
|
private |
DBWakeupToggler(long idletimex)
|
Method Summary | |
static void |
attach(java.sql.Connection conn)
Attach a connection to the wakeup toggler. |
static void |
attach(java.sql.Connection conn,
long idletime)
Attach a connection to the wakeup toggler. |
static void |
attach(java.sql.Connection conn,
long idletime,
java.lang.String querystringx,
java.lang.String name)
Attach a connection to the wakeup toggler. |
private void |
attach(java.sql.Connection conn,
java.lang.String querystringx,
java.lang.String name)
|
private void |
doRemove(java.sql.Connection conn)
|
static void |
remove(java.sql.Connection conn)
Remove a connection from the wakeup toggler. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final long DEFAULTIDLETIME
public static final java.lang.String DEFAULTQUERY
private java.lang.Thread handleThread
private long sleeptime
private long sleeprest
private long nextruntime
private java.util.List connections
private java.util.List newconnections
private java.util.List removeconnections
private static java.util.Map togglers
private static java.util.Map conntotoggler
private static int counter
Constructor Detail |
private DBWakeupToggler(long idletimex)
private DBWakeupToggler()
Method Detail |
private void attach(java.sql.Connection conn, java.lang.String querystringx, java.lang.String name)
private void doRemove(java.sql.Connection conn)
public static void attach(java.sql.Connection conn, long idletime, java.lang.String querystringx, java.lang.String name)
public static void attach(java.sql.Connection conn, long idletime)
public static void attach(java.sql.Connection conn)
public static void remove(java.sql.Connection conn)
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |