public abstract class ObjectPool<T>
extends java.lang.Object
Constructor and Description |
---|
ObjectPool() |
Modifier and Type | Method and Description |
---|---|
T |
borrowObject()
Gets the next free object from the pool.
|
protected abstract T |
createObject()
Creates a new object.
|
void |
returnObject(T object)
Returns object back to the pool.
|
void |
shutdown()
Shutdown this pool.
|
public T borrowObject()
public void returnObject(T object)
object
- object to be returnedpublic void shutdown()
protected abstract T createObject()