Package de.intarsys.tools.pool
Class GenericPool
java.lang.Object
de.intarsys.tools.pool.GenericPool
- All Implemented Interfaces:
IPool
A very simple implementation of a generic
IPool
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
activateObject
(Object object) protected void
void
Add an object to the pool.checkout
(long timeout) Get an object from the pool.void
close()
Close the pool.protected Object
protected void
deactivateObject
(Object object) void
Destroy an object previously allocated from the pool.protected void
destroyObject
(Object object) protected boolean
isClosed()
-
Constructor Details
-
GenericPool
-
-
Method Details
-
checkin
Description copied from interface:IPool
Add an object to the pool. -
deactivateObject
- Throws:
Exception
-
destroyObject
- Throws:
Exception
-
isClosed
protected boolean isClosed() -
assertOpen
protected void assertOpen() -
checkout
Description copied from interface:IPool
Get an object from the pool.This may be a reused object or a new one, up to the pool strategy and size.
-
activateObject
- Throws:
Exception
-
createObject
- Throws:
Exception
-
close
Description copied from interface:IPool
Close the pool. -
destroy
Description copied from interface:IPool
Destroy an object previously allocated from the pool.
-