Class GenericKeyedObjectPool.ObjectDeque<S>

  • 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.
    • Constructor Detail

      • 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 Detail

      • 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