Interface Pool<T,​E extends java.lang.Exception>

  • All Known Subinterfaces:
    ConnectionPool
    All Known Implementing Classes:
    ApachePoolImpl

    public interface Pool<T,​E extends java.lang.Exception>

    Simple interface for a Pool of objects

    Since:
    0.5.1
    Version:
    0.7
    Author:
    Michael Grove
    • Method Detail

      • obtain

        T obtain()
          throws E extends java.lang.Exception
        Get an object from the pool
        Returns:
        the object
        Throws:
        E - if there was an error obtaining the object or the pool is exhausted or at capacity
        E extends java.lang.Exception
      • shutdown

        void shutdown()
               throws E extends java.lang.Exception
        Shutdown the pool
        Throws:
        E - if there was an error while shutting the pool down
        E extends java.lang.Exception
      • release

        void release​(T theObj)
              throws E extends java.lang.Exception
        Return the object to the pool
        Parameters:
        theObj - the object
        Throws:
        E - if there was an error while releasing the object
        E extends java.lang.Exception