org.ow2.jonas.resource.internal.pool.lib
Class HArrayPoolMonitor

java.lang.Object
  extended by java.lang.Thread
      extended by org.ow2.jonas.resource.internal.pool.lib.HArrayPoolMonitor
All Implemented Interfaces:
Runnable

public class HArrayPoolMonitor
extends Thread

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

Author:
Eric Hardesty Contributor(s):

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
HArrayPoolMonitor(Pool pool, String jndiName)
          Pool monitor constructor
 
Method Summary
 void run()
          Run the array pool monitor
 void setAdjustPeriod(int sec)
          Set the adjust period.
 void setSamplingPeriod(int sec)
          Set the sampling period.
 void setValidationPeriod(int sec)
          Set the validation period.
 void stopit()
          Stop this thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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
 

Constructor Detail

HArrayPoolMonitor

public HArrayPoolMonitor(Pool pool,
                         String jndiName)
Pool monitor constructor

Parameters:
pool - Pool to monitor
Method Detail

setAdjustPeriod

public void setAdjustPeriod(int sec)
Set the adjust period. Moreover, this can be reconfigured later.

Parameters:
sec - adjust period in sec.

setSamplingPeriod

public void setSamplingPeriod(int sec)
Set the sampling period. Moreover, this can be reconfigured later.

Parameters:
sec - sampling period in sec.

setValidationPeriod

public void setValidationPeriod(int sec)
Set the validation period. Moreover, this can be reconfigured later.

Parameters:
sec - validation period in sec.

stopit

public void stopit()
Stop this thread.


run

public void run()
Run the array pool monitor

Specified by:
run in interface Runnable
Overrides:
run in class Thread


Copyright © 2010 OW2 Consortium. All Rights Reserved.