public abstract class QueueResettableObjectPool<T extends Resettable> extends Object implements ResettableObjectPoolInterface<T>
| Constructor and Description |
|---|
QueueResettableObjectPool() |
| Modifier and Type | Method and Description |
|---|---|
T |
borrowObject()
Borrow an object from the pool.
|
void |
clear()
Clear objects stored in the pool waited to be borrowed.
|
int |
getNumActive()
Number of active objects (checked out of the pool, not yet returned).
|
int |
getNumIdle()
Number of idle objects (in the pool).
|
void |
invalidateObject(T t)
Return an object but do not place it back into the pool as for some reason the object has become bad.
|
abstract T |
makeObject()
Abstract class for making objects for the pool.
|
void |
returnObject(T t)
Return an object to the pool that was borrowed.
|
public abstract T makeObject()
makeObject in interface ResettableObjectPoolInterface<T extends Resettable>public T borrowObject()
borrowObject in interface ResettableObjectPoolInterface<T extends Resettable>public void returnObject(T t)
returnObject in interface ResettableObjectPoolInterface<T extends Resettable>t - object to returnpublic void invalidateObject(T t)
invalidateObject in interface ResettableObjectPoolInterface<T extends Resettable>t - object being returned but not placed into the queuepublic int getNumIdle()
getNumIdle in interface ResettableObjectPoolInterface<T extends Resettable>public int getNumActive()
getNumActive in interface ResettableObjectPoolInterface<T extends Resettable>public void clear()
clear in interface ResettableObjectPoolInterface<T extends Resettable>Copyright © 2017 Campagne Laboratory. All rights reserved.