com.jolbox.bonecp
Class ConnectionTesterThread

java.lang.Object
  extended by 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

Constructor Summary
protected ConnectionTesterThread(ConnectionPartition connectionPartition, ScheduledExecutorService scheduler, BoneCP pool, long idleMaxAgeInMs, long idleConnectionTestPeriodInMs, boolean lifoMode)
          Constructor
 
Method Summary
 void run()
          Invoked periodically.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionTesterThread

protected ConnectionTesterThread(ConnectionPartition connectionPartition,
                                 ScheduledExecutorService scheduler,
                                 BoneCP pool,
                                 long idleMaxAgeInMs,
                                 long idleConnectionTestPeriodInMs,
                                 boolean lifoMode)
Constructor

Parameters:
connectionPartition - partition to work on
scheduler - Scheduler handler.
pool - pool handle
idleMaxAgeInMs - Threads older than this are killed off
idleConnectionTestPeriodInMs - Threads that are idle for more than this time are sent a keep-alive.
lifoMode - if true, we're running under a lifo fashion.
Method Detail

run

public void run()
Invoked periodically.

Specified by:
run in interface Runnable


Copyright © 2009-2011 JolBox. All Rights Reserved.