Package de.intarsys.tools.pool
Class GenericPool
- java.lang.Object
-
- de.intarsys.tools.pool.GenericPool
-
-
Constructor Summary
Constructors Constructor Description GenericPool(IPoolObjectFactory objectFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
activateObject(java.lang.Object object)
protected void
assertOpen()
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.protected java.lang.Object
createObject()
protected void
deactivateObject(java.lang.Object object)
void
destroy(java.lang.Object object)
Destroy an object previously allocated from the pool.protected void
destroyObject(java.lang.Object object)
protected boolean
isClosed()
-
-
-
Constructor Detail
-
GenericPool
public GenericPool(IPoolObjectFactory objectFactory)
-
-
Method Detail
-
checkin
public void checkin(java.lang.Object object) throws java.lang.Exception
Description copied from interface:IPool
Add an object to the pool.
-
deactivateObject
protected void deactivateObject(java.lang.Object object) throws java.lang.Exception
- Throws:
java.lang.Exception
-
destroyObject
protected void destroyObject(java.lang.Object object) throws java.lang.Exception
- Throws:
java.lang.Exception
-
isClosed
protected boolean isClosed()
-
assertOpen
protected void assertOpen()
-
checkout
public java.lang.Object checkout(long timeout) throws java.lang.Exception
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
protected void activateObject(java.lang.Object object) throws java.lang.Exception
- Throws:
java.lang.Exception
-
createObject
protected java.lang.Object createObject() throws java.lang.Exception
- Throws:
java.lang.Exception
-
close
public void close() throws java.lang.Exception
Description copied from interface:IPool
Close the pool.
-
-