public interface IPool
| Modifier and Type | Method and Description |
|---|---|
void |
checkin(java.lang.Object object)
Add an object to the pool.
|
java.lang.Object |
checkout(long timeout)
Get an object from the pool.
|
void |
close()
Close the pool.
|
void |
destroy(java.lang.Object object)
Destroy an object previously allocated from the pool.
|
void checkin(java.lang.Object object)
throws java.lang.Exception
object - The object to be added to the pool.java.lang.Exceptionjava.lang.Object checkout(long timeout)
throws java.lang.Exception
This may be a reused object or a new one, up to the pool strategy and size.
timeout - The maximum time to wait for an instance to be available in
milliseconds. -1 will wait indefinitely, 0 will not wait.java.lang.Exceptionvoid close()
throws java.lang.Exception
java.lang.Exceptionvoid destroy(java.lang.Object object)
throws java.lang.Exception
object - The object to be destroyed.java.lang.Exception