K
- the type of keys in this poolV
- the type of objects held in this poolpublic class StackKeyedObjectPoolFactory<K,V> extends Object implements KeyedObjectPoolFactory<K,V>
StackKeyedObjectPool
instances.StackKeyedObjectPool
,
KeyedObjectPoolFactory
Modifier and Type | Field and Description |
---|---|
protected KeyedPoolableObjectFactory<K,V> |
_factory
Deprecated.
to be removed in pool 2.0
|
protected int |
_initCapacity
Deprecated.
to be removed in pool 2.0
|
protected int |
_maxSleeping
Deprecated.
to be removed in pool 2.0
|
Constructor and Description |
---|
StackKeyedObjectPoolFactory()
Create a new StackKeyedObjectPoolFactory.
|
StackKeyedObjectPoolFactory(int maxSleeping)
Create a new StackKeyedObjectPoolFactory.
|
StackKeyedObjectPoolFactory(int maxSleeping,
int initialCapacity)
Create a new StackKeyedObjectPoolFactory.
|
StackKeyedObjectPoolFactory(KeyedPoolableObjectFactory<K,V> factory)
Create a new StackKeyedObjectPoolFactory.
|
StackKeyedObjectPoolFactory(KeyedPoolableObjectFactory<K,V> factory,
int maxSleeping)
Create a new StackKeyedObjectPoolFactory.
|
StackKeyedObjectPoolFactory(KeyedPoolableObjectFactory<K,V> factory,
int maxSleeping,
int initialCapacity)
Create a new StackKeyedObjectPoolFactory.
|
Modifier and Type | Method and Description |
---|---|
KeyedObjectPool<K,V> |
createPool()
Create a StackKeyedObjectPool with current property settings.
|
KeyedPoolableObjectFactory<K,V> |
getFactory()
Returns the KeyedPoolableObjectFactory used by StackKeyedObjectPools created by this factory
|
int |
getInitialCapacity()
Returns the initial capacity of StackKeyedObjectPools created by this factory.
|
int |
getMaxSleeping()
Returns the maximum number of idle instances in each keyed pool for StackKeyedObjectPools created by this factory
|
@Deprecated protected KeyedPoolableObjectFactory<K,V> _factory
@Deprecated protected int _maxSleeping
@Deprecated protected int _initCapacity
public StackKeyedObjectPoolFactory()
public StackKeyedObjectPoolFactory(int maxSleeping)
maxSleeping
- cap on the number of "sleeping" instances in the pool.StackKeyedObjectPool.StackKeyedObjectPool(int)
public StackKeyedObjectPoolFactory(int maxSleeping, int initialCapacity)
maxSleeping
- cap on the number of "sleeping" instances in the pool.initialCapacity
- initial size of the pool (this specifies the size of the container,
it does not cause the pool to be pre-populated.)StackKeyedObjectPool.StackKeyedObjectPool(int, int)
public StackKeyedObjectPoolFactory(KeyedPoolableObjectFactory<K,V> factory)
factory
- the KeyedPoolableObjectFactory used by created pools.StackKeyedObjectPool.StackKeyedObjectPool(KeyedPoolableObjectFactory)
public StackKeyedObjectPoolFactory(KeyedPoolableObjectFactory<K,V> factory, int maxSleeping)
factory
- the KeyedPoolableObjectFactory used by created pools.maxSleeping
- cap on the number of "sleeping" instances in the pool.StackKeyedObjectPool.StackKeyedObjectPool(KeyedPoolableObjectFactory, int)
public StackKeyedObjectPoolFactory(KeyedPoolableObjectFactory<K,V> factory, int maxSleeping, int initialCapacity)
factory
- the KeyedPoolableObjectFactory used by created pools.maxSleeping
- cap on the number of "sleeping" instances in the pool.initialCapacity
- initial size of the pool (this specifies the size of the container,
it does not cause the pool to be pre-populated.)StackKeyedObjectPool.StackKeyedObjectPool(KeyedPoolableObjectFactory, int, int)
public KeyedObjectPool<K,V> createPool()
createPool
in interface KeyedObjectPoolFactory<K,V>
public KeyedPoolableObjectFactory<K,V> getFactory()
public int getMaxSleeping()
public int getInitialCapacity()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.