org.objectweb.jonas.dbm
Class PoolKeeper

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.objectweb.jonas.dbm.PoolKeeper
All Implemented Interfaces:
java.lang.Runnable

public class PoolKeeper
extends java.lang.Thread

Keeps pool as small as possible (after conn's has reached MaxAge)

Author:
Philippe Durieux Contributor(s):

Field Summary
protected  org.objectweb.util.monolog.api.Logger logger
           
protected  Pool pool
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
PoolKeeper(Pool pool)
           
 
Method Summary
 void run()
           
 void setSamplingPeriod(int sec)
          Set the sampling period.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pool

protected Pool pool

logger

protected org.objectweb.util.monolog.api.Logger logger
Constructor Detail

PoolKeeper

public PoolKeeper(Pool pool)
Method Detail

setSamplingPeriod

public void setSamplingPeriod(int sec)
Set the sampling period. This cannot be done in the PoolKeeper constructor, because the sampling period has not been set already in the Pool. Moreover, this can be reconfigured later.

Parameters:
sec - sampling period in sec.

run

public void run()