TorqueBox 3.1.2

org.torquebox.core.pool
Class PoolManager<T>

java.lang.Object
  extended by org.torquebox.core.pool.DefaultPoolListener<T>
      extended by org.torquebox.core.pool.PoolManager<T>
All Implemented Interfaces:
PoolListener<T>

public class PoolManager<T>
extends DefaultPoolListener<T>


Constructor Summary
PoolManager(SimplePool<T> pool, InstanceFactory<T> factory, int minInstances, int maxInstances)
           
 
Method Summary
protected  void drainInstance()
           
protected  void fillInstance()
           
 InstanceFactory<T> getInstanceFactory()
           
 int getMaximumInstances()
           
 int getMininmumInstances()
           
 org.jboss.as.naming.context.NamespaceContextSelector getNamespaceContextSelector()
           
 void instanceRequested(int totalInstances, int availableNow)
           
 void setInstanceFactory(InstanceFactory<T> factory)
           
 void setMaximumInstances(int maxInstances)
           
 void setMinimumInstances(int minInstances)
           
 void setNamespaceContextSelector(org.jboss.as.naming.context.NamespaceContextSelector nsContextSelector)
           
 void start()
           
 void stop()
           
protected  void taskCompleted()
           
 void waitForAllReturned()
           
 void waitForEmpty()
           
 void waitForMinimumFill()
           
 
Methods inherited from class org.torquebox.core.pool.DefaultPoolListener
instanceBorrowed, instanceDrained, instanceFilled, instanceReleased
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PoolManager

public PoolManager(SimplePool<T> pool,
                   InstanceFactory<T> factory,
                   int minInstances,
                   int maxInstances)
Method Detail

taskCompleted

protected void taskCompleted()

setMinimumInstances

public void setMinimumInstances(int minInstances)

getMininmumInstances

public int getMininmumInstances()

setMaximumInstances

public void setMaximumInstances(int maxInstances)

getMaximumInstances

public int getMaximumInstances()

setInstanceFactory

public void setInstanceFactory(InstanceFactory<T> factory)

getInstanceFactory

public InstanceFactory<T> getInstanceFactory()

instanceRequested

public void instanceRequested(int totalInstances,
                              int availableNow)
Specified by:
instanceRequested in interface PoolListener<T>
Overrides:
instanceRequested in class DefaultPoolListener<T>

fillInstance

protected void fillInstance()
                     throws Exception
Throws:
Exception

drainInstance

protected void drainInstance()
                      throws Exception
Throws:
Exception

start

public void start()

stop

public void stop()
          throws Exception
Throws:
Exception

waitForMinimumFill

public void waitForMinimumFill()
                        throws InterruptedException
Throws:
InterruptedException

waitForEmpty

public void waitForEmpty()
                  throws InterruptedException
Throws:
InterruptedException

waitForAllReturned

public void waitForAllReturned()
                        throws InterruptedException
Throws:
InterruptedException

setNamespaceContextSelector

public void setNamespaceContextSelector(org.jboss.as.naming.context.NamespaceContextSelector nsContextSelector)

getNamespaceContextSelector

public org.jboss.as.naming.context.NamespaceContextSelector getNamespaceContextSelector()

TorqueBox 3.1.2

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.