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 Object
Maintains information on the per key queue for a given key.
  • Field Details

  • Constructor Details

    • ObjectDeque

      public ObjectDeque(boolean fairness)
      Create a new ObjecDeque with the given fairness policy.
      Parameters:
      fairness - true means client threads waiting to borrow / return instances will be served as if waiting in a FIFO queue.
  • Method Details

    • getIdleObjects

      public LinkedBlockingDeque<PooledObject<S>> getIdleObjects()
      Obtain the idle objects for the current key.
      Returns:
      The idle objects
    • getCreateCount

      public 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 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

      Obtain all the objects for the current key.
      Returns:
      All the objects
    • toString

      public String toString()
      Overrides:
      toString in class Object