com.jolbox.bonecp
Class ConnectionTesterThread
java.lang.Object
com.jolbox.bonecp.ConnectionTesterThread
- All Implemented Interfaces:
- Runnable
public class ConnectionTesterThread
- extends Object
- implements Runnable
Periodically sends a keep-alive statement to idle threads
and kills off any connections that have been unused for a long time (or broken).
- Author:
- wwadge
|
Method Summary |
void |
run()
Invoked periodically. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConnectionTesterThread
protected ConnectionTesterThread(ConnectionPartition connectionPartition,
ScheduledExecutorService scheduler,
BoneCP pool,
long idleMaxAgeInMs,
long idleConnectionTestPeriodInMs,
boolean lifoMode)
- Constructor
- Parameters:
connectionPartition - partition to work onscheduler - Scheduler handler.pool - pool handleidleMaxAgeInMs - Threads older than this are killed offidleConnectionTestPeriodInMs - Threads that are idle for more than this time are sent a keep-alive.lifoMode - if true, we're running under a lifo fashion.
run
public void run()
- Invoked periodically.
- Specified by:
run in interface Runnable
Copyright © 2009-2011 JolBox. All Rights Reserved.