|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Unlike most collections, pools do not allow null values.
A pool of resources.
All methods inherited from the Collection
refer to the free
members of the pool. The takenSet()
method can be used to access
the taken items. In pools, the Collection.add(java.lang.Object)
and related methods
are overloaded to either add new pooled items or return taken instances.
Whether returning taken instances is required depends on the pool
implementation.
Method Summary | |
boolean |
equals(Object obj)
Deprecated. Pool equality should be implemented to compare the free elements of the pool. |
Object |
get()
Deprecated. Return a free pooled instance. |
Object |
get(Object match)
Deprecated. Return a free pooled instance that compares equal to the given object using the equals method. |
Object |
get(Object match,
Comparator comp)
Deprecated. Return a free pooled instance that compares equal to the given object via the given comparator. |
int |
getAutoReturn()
Deprecated. Return the maximum number of milliseconds a pooled item can be taken before it is automatically returned to the pool. |
int |
getMaxPool()
Deprecated. Return the maximum number of pooled items, including taken instances. |
int |
getMinPool()
Deprecated. Return the minimum number of pooled items, including taken instances. |
int |
getWait()
Deprecated. Return the maximum number of milliseconds the get() method will
wait for a free pool item. |
int |
hashCode()
Deprecated. The hash code should be implemented to be consistent with equality. |
Iterator |
iterator()
Deprecated. Returns an iterator over the free elements of the pool. |
void |
setAutoReturn(int millis)
Deprecated. Return the maximum number of milliseconds a pooled item can be taken before it is automatically returned to the pool. |
void |
setMaxPool(int max)
Deprecated. Set the maximum number of pooled items, including taken instances. |
void |
setMinPool(int min)
Deprecated. Set the minimum number of pooled items, including taken instances. |
void |
setWait(int millis)
Deprecated. Set the maximum number of milliseconds the get() method will
wait for a free pool item. |
Set |
takenSet()
Deprecated. Return a read-only view of the set of taken instances. |
Methods inherited from interface java.util.Set |
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray |
Method Detail |
public int getMaxPool()
public void setMaxPool(int max)
Collection.add(java.lang.Object)
operations will return false until the maximum
is met.public int getMinPool()
Collection.remove(java.lang.Object)
methods may fail if the size would be trimmed
to under the minimum value.public void setMinPool(int min)
Collection.remove(java.lang.Object)
operations may fail if the constraint would be
violated. However, the Collection.clear()
operation will always
succeed.public int getWait()
get()
method will
wait for a free pool item. This property defaults to 0.public void setWait(int millis)
get()
method will
wait for a free pool item. This property defaults to 0.public int getAutoReturn()
public void setAutoReturn(int millis)
public Iterator iterator()
Iterator.remove()
remove method may throw an
IllegalStateException
if removing an element would
violoate the minimum pool size.iterator
in interface Set
public Object get()
public Object get(Object match)
equals
method.get()
public Object get(Object match, Comparator comp)
get()
public Set takenSet()
public boolean equals(Object obj)
equals
in interface Set
equals
in class Object
public int hashCode()
hashCode
in interface Set
hashCode
in class Object
|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |