Class GenericKeyedObjectPool.ObjectDeque<S>
- java.lang.Object
-
- org.datanucleus.store.rdbms.datasource.dbcp2.pool2.impl.GenericKeyedObjectPool.ObjectDeque<S>
-
- Type Parameters:
S
- type of objects in the pool
- Enclosing class:
- GenericKeyedObjectPool<K,T>
private class GenericKeyedObjectPool.ObjectDeque<S> extends java.lang.Object
Maintains information on the per key queue for a given key.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<BaseGenericObjectPool.IdentityWrapper<S>,PooledObject<S>>
allObjects
private java.util.concurrent.atomic.AtomicInteger
createCount
private LinkedBlockingDeque<PooledObject<S>>
idleObjects
private long
makeObjectCount
private java.lang.Object
makeObjectCountLock
private java.util.concurrent.atomic.AtomicLong
numInterested
-
Constructor Summary
Constructors Constructor Description ObjectDeque(boolean fairness)
Create a new ObjecDeque with the given fairness policy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.java.lang.String
toString()
-
-
-
Field Detail
-
idleObjects
private final LinkedBlockingDeque<PooledObject<S>> idleObjects
-
createCount
private final java.util.concurrent.atomic.AtomicInteger createCount
-
makeObjectCount
private long makeObjectCount
-
makeObjectCountLock
private final java.lang.Object makeObjectCountLock
-
allObjects
private final java.util.Map<BaseGenericObjectPool.IdentityWrapper<S>,PooledObject<S>> allObjects
-
numInterested
private final java.util.concurrent.atomic.AtomicLong numInterested
-
-
Method Detail
-
getIdleObjects
public LinkedBlockingDeque<PooledObject<S>> getIdleObjects()
Obtain the idle objects for the current key.- Returns:
- The idle objects
-
getCreateCount
public java.util.concurrent.atomic.AtomicInteger getCreateCount()
Obtain the count of the number of objects created for the current key.- Returns:
- The number of objects created for this key
-
getNumInterested
public java.util.concurrent.atomic.AtomicLong getNumInterested()
Obtain the number of threads with an interest registered in this key.- Returns:
- The number of threads with a registered interest in this key
-
getAllObjects
public java.util.Map<BaseGenericObjectPool.IdentityWrapper<S>,PooledObject<S>> getAllObjects()
Obtain all the objects for the current key.- Returns:
- All the objects
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-