|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ObjectPool
Copyright © 2001, Atomikos. All rights reserved. An object pool is for efficient (re)use of objects.
| Method Summary | |
|---|---|
Identifiable |
add(Identifiable identifiable)
Add an identifiable instance to the pool. |
Enumeration |
elements()
Retrieve an enummeration of all elements in the pool. |
long |
getMaxSize()
Get the maximum size of the pool. |
long |
getSize()
Get the current size of the pool. |
boolean |
isEmpty()
Test if pool is empty. |
boolean |
isFull()
Test if pool is full. |
Identifiable |
remove()
Remove an arbitrary element from the pool. |
Identifiable |
remove(Object id)
Remove an object from the pool. |
Identifiable |
retrieve()
Get an arbitrary element from the pool. |
Identifiable |
retrieve(Object id)
Retrieve an object from the pool. |
| Method Detail |
|---|
long getMaxSize()
long getSize()
boolean isFull()
boolean isEmpty()
Identifiable add(Identifiable identifiable)
Identifiable - The object to put in the pool.
Identifiable retrieve(Object id)
throws ObjectNotFoundException
id - The id of the object wanted.
ObjectNotFoundException - If not found.
Identifiable retrieve()
throws ObjectNotFoundException
ObjectNotFoundException - If empty.
Enumeration elements()
throws ObjectNotFoundException
ObjectNotFoundException - If empty.
Identifiable remove()
throws ObjectNotFoundException
ObjectNotFoundException - If empty.
Identifiable remove(Object id)
throws ObjectNotFoundException
id - The identifier for the object.
ObjectNotFoundException - If the id was not in the pool.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||