Package de.intarsys.tools.pool
Interface IPool
- All Known Implementing Classes:
GenericPool
public interface IPool
A pool of objects.
-
Method Summary
-
Method Details
-
checkin
Add an object to the pool.- Parameters:
object
- The object to be added to the pool.- Throws:
Exception
-
checkout
Get an object from the pool.This may be a reused object or a new one, up to the pool strategy and size.
- Parameters:
timeout
- The maximum time to wait for an instance to be available in milliseconds. -1 will wait indefinitely, 0 will not wait.- Returns:
- A new object from the pool.
- Throws:
Exception
-
close
Close the pool.- Throws:
Exception
-
destroy
Destroy an object previously allocated from the pool.- Parameters:
object
- The object to be destroyed.- Throws:
Exception
-