org.logicalcobwebs.proxool
Class HouseKeeper

java.lang.Object
  extended by org.logicalcobwebs.proxool.HouseKeeper

 class HouseKeeper
extends java.lang.Object

Responisble for house keeping one pool

Since:
Proxool 0.8
Version:
$Revision: 1.4 $, $Date: 2005/10/02 12:35:06 $
Author:
bill, $Author: billhorsman $ (current maintainer)

Field Summary
private  ConnectionPool connectionPool
           
private static Log LOG
           
private  long timeLastSwept
           
 
Constructor Summary
HouseKeeper(ConnectionPool connectionPool)
           
 
Method Summary
private  void calculateUpState(int recentlyStartedActiveConnectionCount)
           
protected  java.lang.String getAlias()
          Identifies the pool we are sweeping
private  long getTimeSinceLastSweep()
          Get the time since the last sweep was completed
protected  boolean isSweepDue()
          Should we sleep
protected  void sweep()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final Log LOG

connectionPool

private ConnectionPool connectionPool

timeLastSwept

private long timeLastSwept
Constructor Detail

HouseKeeper

public HouseKeeper(ConnectionPool connectionPool)
Method Detail

sweep

protected void sweep()
              throws ProxoolException
Throws:
ProxoolException

getTimeSinceLastSweep

private long getTimeSinceLastSweep()
Get the time since the last sweep was completed

Returns:
timeSinceLastSweep (milliseconds)

isSweepDue

protected boolean isSweepDue()
Should we sleep

Returns:
true if the time since the last sweep was completed is greater than the houseKeepingSleepTime property.

calculateUpState

private void calculateUpState(int recentlyStartedActiveConnectionCount)

getAlias

protected java.lang.String getAlias()
Identifies the pool we are sweeping

Returns:
alias