Interface PoolWaitQueue

  • All Known Implementing Classes:
    DefaultPoolWaitQueue

    public interface PoolWaitQueue
    Represents the pool wait queue
    To plug-in multiple implementation of wait-queue
    Author:
    Jagadish Ramu
    • Method Detail

      • getQueueLength

        int getQueueLength()
        returns the length of wait queue
        Returns:
        length of wait queue.
      • addToQueue

        void addToQueue​(Object o)
        resource requesting thread will be added to queue
        and the object on which it is made to wait is returned
        Parameters:
        o - Object
      • removeFromQueue

        boolean removeFromQueue​(Object o)
        removes the specified object (resource request) from the queue
        Parameters:
        o - Object
        Returns:
        boolean indicating whether the object was removed or not
      • remove

        Object remove()
        removes the first object (resource request) from the queue
        Returns:
        Object first object
      • peek

        Object peek()
        returns (does not remove) the first object (resource request) from the queue
        Returns:
        Object first object
      • getQueueContents

        Collection getQueueContents()
        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.
        Returns:
        Collection