com.jolbox.bonecp
Class ConnectionMaxAgeThread

java.lang.Object
  extended by com.jolbox.bonecp.ConnectionMaxAgeThread
All Implemented Interfaces:
Runnable

public class ConnectionMaxAgeThread
extends Object
implements Runnable

Periodically checks for connections to see if the connection has expired.

Author:
wwadge

Field Summary
protected static org.slf4j.Logger logger
          Logger handle.
 
Constructor Summary
protected ConnectionMaxAgeThread(ConnectionPartition connectionPartition, ScheduledExecutorService scheduler, BoneCP pool, long maxAgeInMs, boolean lifoMode)
          Constructor
 
Method Summary
protected  void closeConnection(ConnectionHandle connection)
          Closes off this connection
 void run()
          Invoked periodically.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.slf4j.Logger logger
Logger handle.

Constructor Detail

ConnectionMaxAgeThread

protected ConnectionMaxAgeThread(ConnectionPartition connectionPartition,
                                 ScheduledExecutorService scheduler,
                                 BoneCP pool,
                                 long maxAgeInMs,
                                 boolean lifoMode)
Constructor

Parameters:
connectionPartition - partition to work on
scheduler - Scheduler handler.
pool - pool handle
maxAgeInMs - Threads older than this are killed off
lifoMode - if true, we're running under a lifo fashion.
Method Detail

run

public void run()
Invoked periodically.

Specified by:
run in interface Runnable

closeConnection

protected void closeConnection(ConnectionHandle connection)
Closes off this connection

Parameters:
connection - to close


Copyright © 2009-2011 JolBox. All Rights Reserved.