Class DefaultPoolWaitQueue

  • All Implemented Interfaces:
    PoolWaitQueue

    public class DefaultPoolWaitQueue
    extends Object
    implements PoolWaitQueue
    Default wait queue for the connection pool
    Author:
    Jagadish Ramu
    • Field Detail

      • _logger

        protected static final Logger _logger
    • Constructor Detail

      • DefaultPoolWaitQueue

        public DefaultPoolWaitQueue()
    • Method Detail

      • getQueueLength

        public int getQueueLength()
        Description copied from interface: PoolWaitQueue
        returns the length of wait queue
        Specified by:
        getQueueLength in interface PoolWaitQueue
        Returns:
        length of wait queue.
      • addToQueue

        public void addToQueue​(Object waitMonitor)
        Description copied from interface: PoolWaitQueue
        resource requesting thread will be added to queue
        and the object on which it is made to wait is returned
        Specified by:
        addToQueue in interface PoolWaitQueue
        Parameters:
        waitMonitor - Object
      • removeFromQueue

        public boolean removeFromQueue​(Object o)
        Description copied from interface: PoolWaitQueue
        removes the specified object (resource request) from the queue
        Specified by:
        removeFromQueue in interface PoolWaitQueue
        Parameters:
        o - Object
        Returns:
        boolean indicating whether the object was removed or not
      • remove

        public Object remove()
        Description copied from interface: PoolWaitQueue
        removes the first object (resource request) from the queue
        Specified by:
        remove in interface PoolWaitQueue
        Returns:
        Object first object
      • peek

        public Object peek()
        Description copied from interface: PoolWaitQueue
        returns (does not remove) the first object (resource request) from the queue
        Specified by:
        peek in interface PoolWaitQueue
        Returns:
        Object first object
      • getQueueContents

        public Collection getQueueContents()
        Description copied from interface: PoolWaitQueue
        used to get access to the list of waiting clients
        Useful in case of rolling over from one pool to another eg: transparent-dynamic-pool-reconfiguration.
        Specified by:
        getQueueContents in interface PoolWaitQueue
        Returns:
        Collection
      • debug

        protected void debug​(String debugStatement)