Uses of Interface
org.apache.commons.pool.PoolableObjectFactory
Packages that use PoolableObjectFactory
Package
Description
Object pooling API.
Object pooling API implementations.
-
Uses of PoolableObjectFactory in org.apache.commons.pool
Classes in org.apache.commons.pool that implement PoolableObjectFactoryModifier and TypeClassDescriptionclass
A base implementation ofPoolableObjectFactory
.private static class
Adaptor class that wraps and converts a KeyedPoolableObjectFactory with a fixed key to a PoolableObjectFactory.private static class
A fully synchronized PoolableObjectFactory that wraps a PoolableObjectFactory and synchronizes access to the wrapped factory methods.Fields in org.apache.commons.pool declared as PoolableObjectFactoryModifier and TypeFieldDescriptionprivate final PoolableObjectFactory<V>
PoolUtils.KeyedPoolableObjectFactoryAdaptor.factory
Underlying PoolableObjectFactoryprivate final PoolableObjectFactory<T>
PoolUtils.SynchronizedPoolableObjectFactory.factory
Wrapped factoryMethods in org.apache.commons.pool that return PoolableObjectFactoryModifier and TypeMethodDescriptionstatic <V> PoolableObjectFactory<V>
PoolUtils.adapt
(KeyedPoolableObjectFactory<Object, V> keyedFactory) Adapt aKeyedPoolableObjectFactory
instance to work where aPoolableObjectFactory
is needed.static <K,
V> PoolableObjectFactory<V> PoolUtils.adapt
(KeyedPoolableObjectFactory<K, V> keyedFactory, K key) Adapt aKeyedPoolableObjectFactory
instance to work where aPoolableObjectFactory
is needed using the specifiedkey
when delegating.static <T> PoolableObjectFactory<T>
PoolUtils.synchronizedPoolableFactory
(PoolableObjectFactory<T> factory) Returns a synchronized (thread-safe) PoolableObjectFactory backed by the specified PoolableObjectFactory.Methods in org.apache.commons.pool with parameters of type PoolableObjectFactoryModifier and TypeMethodDescriptionstatic <K,
V> KeyedPoolableObjectFactory<K, V> PoolUtils.adapt
(PoolableObjectFactory<V> factory) Adapt aPoolableObjectFactory
instance to work where aKeyedPoolableObjectFactory
is needed.void
BaseObjectPool.setFactory
(PoolableObjectFactory<T> factory) Deprecated.to be removed in pool 2.0void
ObjectPool.setFactory
(PoolableObjectFactory<T> factory) Deprecated.to be removed in pool 2.0void
PoolUtils.CheckedObjectPool.setFactory
(PoolableObjectFactory<T> factory) Deprecated.to be removed in version 2.0void
PoolUtils.ErodingObjectPool.setFactory
(PoolableObjectFactory<T> factory) Deprecated.to be removed in pool 2.0void
PoolUtils.ObjectPoolAdaptor.setFactory
(PoolableObjectFactory<V> factory) Deprecated.to be removed in version 2.0void
PoolUtils.SynchronizedObjectPool.setFactory
(PoolableObjectFactory<T> factory) Deprecated.to be removed in pool 2.0static <T> PoolableObjectFactory<T>
PoolUtils.synchronizedPoolableFactory
(PoolableObjectFactory<T> factory) Returns a synchronized (thread-safe) PoolableObjectFactory backed by the specified PoolableObjectFactory.Constructors in org.apache.commons.pool with parameters of type PoolableObjectFactoryModifierConstructorDescription(package private)
Create a new KeyedPoolableObjectFactoryAdaptor using the given PoolableObjectFactory to manage objects.(package private)
Create a SynchronizedPoolableObjectFactory wrapping the given factory. -
Uses of PoolableObjectFactory in org.apache.commons.pool.impl
Fields in org.apache.commons.pool.impl declared as PoolableObjectFactoryModifier and TypeFieldDescriptionprivate PoolableObjectFactory<T>
GenericObjectPool._factory
protected PoolableObjectFactory<T>
GenericObjectPoolFactory._factory
Deprecated.to be removed in pool 2.0.private PoolableObjectFactory<T>
SoftReferenceObjectPool._factory
protected PoolableObjectFactory<T>
StackObjectPool._factory
Deprecated.to be made private in pool 2.0 - useStackObjectPool.getFactory()
protected PoolableObjectFactory<T>
StackObjectPoolFactory._factory
Deprecated.to be made private in pool 2.0Methods in org.apache.commons.pool.impl that return PoolableObjectFactoryModifier and TypeMethodDescriptionGenericObjectPoolFactory.getFactory()
SoftReferenceObjectPool.getFactory()
Returns thePoolableObjectFactory
used by this pool to create and manage object instances.StackObjectPool.getFactory()
Returns thePoolableObjectFactory
used by this pool to create and manage object instances.StackObjectPoolFactory.getFactory()
Returns the factory used by created pools.Methods in org.apache.commons.pool.impl with parameters of type PoolableObjectFactoryModifier and TypeMethodDescriptionprivate void
GenericObjectPool.destroy
(Collection<GenericKeyedObjectPool.ObjectTimestampPair<T>> c, PoolableObjectFactory<T> factory) Private method to destroy all the objects in a collection using the supplied object factory.void
GenericObjectPool.setFactory
(PoolableObjectFactory<T> factory) Deprecated.to be removed in version 2.0void
SoftReferenceObjectPool.setFactory
(PoolableObjectFactory<T> factory) Deprecated.to be removed in pool 2.0void
StackObjectPool.setFactory
(PoolableObjectFactory<T> factory) Deprecated.to be removed in pool 2.0Constructors in org.apache.commons.pool.impl with parameters of type PoolableObjectFactoryModifierConstructorDescriptionGenericObjectPool
(PoolableObjectFactory<T> factory) Create a new GenericObjectPool using the specified factory.GenericObjectPool
(PoolableObjectFactory<T> factory, int maxActive) Create a new GenericObjectPool using the specified values.GenericObjectPool
(PoolableObjectFactory<T> factory, int maxActive, byte whenExhaustedAction, long maxWait) Create a new GenericObjectPool using the specified values.GenericObjectPool
(PoolableObjectFactory<T> factory, int maxActive, byte whenExhaustedAction, long maxWait, boolean testOnBorrow, boolean testOnReturn) Create a new GenericObjectPool using the specified values.GenericObjectPool
(PoolableObjectFactory<T> factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle) Create a new GenericObjectPool using the specified values.GenericObjectPool
(PoolableObjectFactory<T> factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, boolean testOnBorrow, boolean testOnReturn) Create a new GenericObjectPool using the specified values.GenericObjectPool
(PoolableObjectFactory<T> factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle) Create a new GenericObjectPool using the specified values.GenericObjectPool
(PoolableObjectFactory<T> factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, int minIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle) Create a new GenericObjectPool using the specified values.GenericObjectPool
(PoolableObjectFactory<T> factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, int minIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle, long softMinEvictableIdleTimeMillis) Create a new GenericObjectPool using the specified values.GenericObjectPool
(PoolableObjectFactory<T> factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, int minIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle, long softMinEvictableIdleTimeMillis, boolean lifo) Create a new GenericObjectPool using the specified values.GenericObjectPool
(PoolableObjectFactory<T> factory, GenericObjectPool.Config config) Create a new GenericObjectPool using the specified values.GenericObjectPoolFactory
(PoolableObjectFactory<T> factory) Create a new GenericObjectPoolFactory.GenericObjectPoolFactory
(PoolableObjectFactory<T> factory, int maxActive) Create a new GenericObjectPoolFactory.GenericObjectPoolFactory
(PoolableObjectFactory<T> factory, int maxActive, byte whenExhaustedAction, long maxWait) Create a new GenericObjectPoolFactory.GenericObjectPoolFactory
(PoolableObjectFactory<T> factory, int maxActive, byte whenExhaustedAction, long maxWait, boolean testOnBorrow, boolean testOnReturn) Create a new GenericObjectPoolFactory.GenericObjectPoolFactory
(PoolableObjectFactory<T> factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle) Create a new GenericObjectPoolFactory.GenericObjectPoolFactory
(PoolableObjectFactory<T> factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, boolean testOnBorrow, boolean testOnReturn) Create a new GenericObjectPoolFactory.GenericObjectPoolFactory
(PoolableObjectFactory<T> factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle) Create a new GenericObjectPoolFactory.GenericObjectPoolFactory
(PoolableObjectFactory<T> factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, int minIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle) Create a new GenericObjectPoolFactory.GenericObjectPoolFactory
(PoolableObjectFactory<T> factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, int minIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle, long softMinEvictableIdleTimeMillis) Create a new GenericObjectPoolFactory.GenericObjectPoolFactory
(PoolableObjectFactory<T> factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, int minIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle, long softMinEvictableIdleTimeMillis, boolean lifo) Create a new GenericObjectPoolFactory.GenericObjectPoolFactory
(PoolableObjectFactory<T> factory, GenericObjectPool.Config config) Create a new GenericObjectPoolFactory.SoftReferenceObjectPool
(PoolableObjectFactory<T> factory) Create aSoftReferenceObjectPool
with the specified factory.SoftReferenceObjectPool
(PoolableObjectFactory<T> factory, int initSize) Deprecated.because this is a SoftReference pool, prefilled idle obejects may be garbage collected before they are used.StackObjectPool
(PoolableObjectFactory<T> factory) Create a new StackObjectPool using the specified factory to create new instances.StackObjectPool
(PoolableObjectFactory<T> factory, int maxIdle) Create a new SimpleObjectPool using the specified factory to create new instances, capping the number of "sleeping" instances to maxIdle.StackObjectPool
(PoolableObjectFactory<T> factory, int maxIdle, int initIdleCapacity) Create a new StackObjectPool using the specifiedfactory
to create new instances, capping the number of "sleeping" instances tomaxIdle
, and initially allocating a container capable of containing at leastinitIdleCapacity
instances.StackObjectPoolFactory
(PoolableObjectFactory<T> factory) Create a new StackObjectPoolFactory.StackObjectPoolFactory
(PoolableObjectFactory<T> factory, int maxIdle) Create a new StackObjectPoolFactory.StackObjectPoolFactory
(PoolableObjectFactory<T> factory, int maxIdle, int initIdleCapacity) Create a new StackObjectPoolFactory.