gate.util.spring.xml
Class PoolFiller
java.lang.Object
gate.util.spring.xml.PoolFiller
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean
public class PoolFiller
- extends Object
- implements org.springframework.beans.factory.InitializingBean
Simple bean that takes a pooled target source and performs a sequence
of n getTarget calls followed by n releaseTarget calls. This has the
effect of pre-populating the pool with n instances up-front (normally
a pooled target source only creates objects the first time they are
required). Note that if the specified number of instances is greater
than the maximum size of the pool the number of calls will be reduced
accordingly.
|
Method Summary |
void |
afterPropertiesSet()
|
void |
setNumInstances(int numInstances)
Set the number of nested get/release calls to make. |
void |
setTargetSource(org.springframework.aop.target.AbstractPoolingTargetSource targetSource)
Set the target source to be populated. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PoolFiller
public PoolFiller()
setTargetSource
public void setTargetSource(org.springframework.aop.target.AbstractPoolingTargetSource targetSource)
- Set the target source to be populated.
setNumInstances
public void setNumInstances(int numInstances)
- Set the number of nested get/release calls to make. The actual
number of calls made is the minimum of this value and the maximum
size of the pool.
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
- Throws:
Exception