|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The LiteObjectPool interface defines an interface for an ObjectPool object that does not carry with it several restrictions that our ObjectPool interface does. Therefore, it is more lightweight than our standard ObjectPool and thus is perfect for situations where you need a simply ObjectPool.
| Field Summary | |
static int |
OBJECT_STATUS_ACTIVE
Integer constant that represents the status of an object is active. |
static int |
OBJECT_STATUS_IDLE
Integer constant that represents the status of an object is idle. |
static int |
OBJECT_STATUS_UNKNOWN
Integer constant that represents the status of an Object is unknown. |
| Method Summary | |
void |
addObject(Object object,
int objectStatus)
Add an Object to the ObjectPool. |
Object |
borrowObject()
Borrow an Object from the ObjectPool. |
ObjectPoolConfig |
getConfig()
Get the pool's configuration object. |
void |
removeObject(Object object)
Remove an Object from the ObjectPool. |
void |
returnObject(Object object)
Return an Object to the ObjectPool. |
| Methods inherited from interface com.cafesoft.core.util.Destroyable |
destroy |
| Field Detail |
public static final int OBJECT_STATUS_UNKNOWN
public static final int OBJECT_STATUS_ACTIVE
public static final int OBJECT_STATUS_IDLE
| Method Detail |
public ObjectPoolConfig getConfig()
public void addObject(Object object,
int objectStatus)
throws ObjectPoolException
object - the Object to add to the ObjectPool.objectStatus - the status of the Object being added to the
ObjectPool. This value informs the ObjectPool of the Object
current usage.
ObjectPoolException - if any error occurs adding the Object
to the ObjectPool.public void removeObject(Object object)
object - the Object to remove from the ObjectPool.
public Object borrowObject()
throws ObjectPoolException
ObjectPoolException - if any error occurs borrowing an
Object from the ObjectPool.public void returnObject(Object object)
object - the Object to return to the ObjectPool.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||