Interface JPPoolSynchronousType<K,T extends U,U,C>

Type Parameters:
K - The type of keys
T - The type of pooled values
U - The type of externally visible pooled values
C - The type of context values
All Superinterfaces:
JPPoolSynchronousUsableType<K,T,U,C>
All Known Implementing Classes:
JPPoolSynchronous

public interface JPPoolSynchronousType<K,T extends U,U,C> extends JPPoolSynchronousUsableType<K,T,U,C>
The type of usable synchronous pools that yield values of type T for keys of type K, using context values of type C to create new values if necessary. Only values of type U are exposed to the user: This is to allow the pool to, for example, allocate and manipulate mutable values internally, but only expose read-only interfaces to the user requesting objects from the pool.
  • Method Details

    • deleteSafely

      void deleteSafely(C context) throws JPPoolException
      Delete all items in the pool and shut the pool down. The method will refuse to delete the pool if any items are yet to be returned.
      Parameters:
      context - A context value
      Throws:
      JPPoolException - Iff any of the items in the pool have yet to be returned
    • deleteUnsafely

      void deleteUnsafely(C context) throws JPPoolException
      Delete all items in the pool and shut the pool down. The method will delete the pool even if there are items yet to be returned.
      Parameters:
      context - A context value
      Throws:
      JPPoolException - On errors