org.apache.commons.performance.pool
Class PoolSoak

java.lang.Object
  extended by org.apache.commons.performance.LoadGenerator
      extended by org.apache.commons.performance.pool.PoolSoak

public class PoolSoak
extends LoadGenerator

Configurable load / performance tester for commons pool. Uses Commons Digester to parse and load configuration and spawns PoolClientThread instances to generate load and gather statistics.


Field Summary
 
Fields inherited from class org.apache.commons.performance.LoadGenerator
configFile, cycleType, delayType, digester, logger, maxDelay, minDelay, peakPeriod, rampPeriod, rampType, sigma, troughPeriod
 
Constructor Summary
PoolSoak()
           
 
Method Summary
protected  void cleanUp()
          Close object pool
protected  void configure()
          Add pool configuration to parameters loaded by super.
 void configureAbandonedConfig(String logAbandoned, String removeAbandoned, String abandonedTimeout)
           
 void configureFactory(String activateLatency, String destroyLatency, String makeLatency, String passivateLatency, String validateLatency, String waiterLatency)
           
 void configurePool(String maxActive, String maxActivePerKey, String maxIdle, String minIdle, String maxWait, String exhaustedAction, String testOnBorrow, String testOnReturn, String timeBetweenEvictions, String testsPerEviction, String idleTimeout, String testWhileIdle, String lifo, String type, String samplingRate)
           
protected  GenericKeyedObjectPool getGenericKeyedObjectPool()
           
protected  GenericObjectPool getGenericObjectPool()
           
protected  void init()
          Create object pool and factory
protected  ClientThread makeClientThread(long iterations, long minDelay, long maxDelay, double sigma, String delayType, long rampPeriod, long peakPeriod, long troughPeriod, String cycleType, String rampType, Logger logger, Statistics stats)
          Create and return a PoolClientThread
 
Methods inherited from class org.apache.commons.performance.LoadGenerator
configureRun, execute, getConfigFile, getDigester, getStatistics, parseConfigFile, setConfigFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PoolSoak

public PoolSoak()
Method Detail

configure

protected void configure()
                  throws Exception
Add pool configuration to parameters loaded by super. Also set config file name.

Overrides:
configure in class LoadGenerator
Throws:
Exception

init

protected void init()
             throws Exception
Create object pool and factory

Overrides:
init in class LoadGenerator
Throws:
Exception

cleanUp

protected void cleanUp()
                throws Exception
Close object pool

Overrides:
cleanUp in class LoadGenerator
Throws:
Exception

makeClientThread

protected ClientThread makeClientThread(long iterations,
                                        long minDelay,
                                        long maxDelay,
                                        double sigma,
                                        String delayType,
                                        long rampPeriod,
                                        long peakPeriod,
                                        long troughPeriod,
                                        String cycleType,
                                        String rampType,
                                        Logger logger,
                                        Statistics stats)
Create and return a PoolClientThread

Specified by:
makeClientThread in class LoadGenerator

configureFactory

public void configureFactory(String activateLatency,
                             String destroyLatency,
                             String makeLatency,
                             String passivateLatency,
                             String validateLatency,
                             String waiterLatency)

configurePool

public void configurePool(String maxActive,
                          String maxActivePerKey,
                          String maxIdle,
                          String minIdle,
                          String maxWait,
                          String exhaustedAction,
                          String testOnBorrow,
                          String testOnReturn,
                          String timeBetweenEvictions,
                          String testsPerEviction,
                          String idleTimeout,
                          String testWhileIdle,
                          String lifo,
                          String type,
                          String samplingRate)
                   throws ConfigurationException
Throws:
ConfigurationException

configureAbandonedConfig

public void configureAbandonedConfig(String logAbandoned,
                                     String removeAbandoned,
                                     String abandonedTimeout)

getGenericObjectPool

protected GenericObjectPool getGenericObjectPool()

getGenericKeyedObjectPool

protected GenericKeyedObjectPool getGenericKeyedObjectPool()


Copyright © 2007-2010 The Apache Software Foundation. All Rights Reserved.