private class GenericKeyedObjectPool.ObjectDeque<S>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<BaseGenericObjectPool.IdentityWrapper<S>,PooledObject<S>> |
allObjects |
private java.util.concurrent.atomic.AtomicInteger |
createCount |
private LinkedBlockingDeque<PooledObject<S>> |
idleObjects |
private java.util.concurrent.atomic.AtomicLong |
numInterested |
| Constructor and Description |
|---|
ObjectDeque(boolean fairness)
Create a new ObjecDeque with the given fairness policy.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<BaseGenericObjectPool.IdentityWrapper<S>,PooledObject<S>> |
getAllObjects()
Obtain all the objects for the current key.
|
java.util.concurrent.atomic.AtomicInteger |
getCreateCount()
Obtain the count of the number of objects created for the current
key.
|
LinkedBlockingDeque<PooledObject<S>> |
getIdleObjects()
Obtain the idle objects for the current key.
|
java.util.concurrent.atomic.AtomicLong |
getNumInterested()
Obtain the number of threads with an interest registered in this key.
|
private final LinkedBlockingDeque<PooledObject<S>> idleObjects
private final java.util.concurrent.atomic.AtomicInteger createCount
private final java.util.Map<BaseGenericObjectPool.IdentityWrapper<S>,PooledObject<S>> allObjects
private final java.util.concurrent.atomic.AtomicLong numInterested
public ObjectDeque(boolean fairness)
fairness - true means client threads waiting to borrow / return instances
will be served as if waiting in a FIFO queue.public LinkedBlockingDeque<PooledObject<S>> getIdleObjects()
public java.util.concurrent.atomic.AtomicInteger getCreateCount()
public java.util.concurrent.atomic.AtomicLong getNumInterested()
public java.util.Map<BaseGenericObjectPool.IdentityWrapper<S>,PooledObject<S>> getAllObjects()