|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jdo.util.Pool
public class Pool
A general purpose pooling class.
| Constructor Summary | |
|---|---|
Pool(int size)
Constructs a pool that will limit the number of objects which it can contain. |
|
| Method Summary | |
|---|---|
java.lang.Object |
get()
Gets an object from the pool, if one is available. |
void |
put(java.lang.Object o)
Puts the given object into the pool, if there the pool has fewer than the number of elements specifed when created. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Pool(int size)
size - The maximum number of items that can be put into the pool.| Method Detail |
|---|
public void put(java.lang.Object o)
throws java.lang.InterruptedException
o - Object to be put in the pool.
java.lang.InterruptedException
public java.lang.Object get()
throws java.lang.InterruptedException
java.lang.InterruptedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||