Interface Pool<T,E extends Exception>

All Known Subinterfaces:
ConnectionPool
All Known Implementing Classes:
ApachePoolImpl

public interface Pool<T,E extends Exception>

Simple interface for a Pool of objects

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

    Modifier and Type
    Method
    Description
    Get an object from the pool
    void
    release(T theObj)
    Return the object to the pool
    void
    Shutdown the pool
  • Method Details

    • obtain

      T obtain() throws E
      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
    • shutdown

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

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