Top Description Fields Constructors Methods
org.eclipse.persistence.internal.helper

public Class ThreadCursoredList<E>

extends Vector<E>
Class Inheritance
Imports
java.util.Collection, .Enumeration, .Iterator, .List, .ListIterator, .NoSuchElementException, .Vector, org.eclipse.persistence.exceptions.ValidationException

Special List/Vector subclass that allows concurrent population of the contents while the list is in use. The list will allow iteration while it is still being populated to allow concurrent processing of the contents. Other API such as size that require to full contents know will wait until the list is notified as being complete. This is use to allow the rows and objects of a read-all query to be processed concurrently.
Author
James Sutherland
Since
OracleAS 10g TopLink (10.0.3)

Field Summary

Modifier and TypeField and Description
protected RuntimeException
exception

Used to throw exception that occur from the concurrent population thread.

protected boolean
isComplete

Store if the list is fully populated.

Inherited from java.util.Vector:
capacityIncrementelementCountelementData

Constructor Summary

AccessConstructor and Description
public
ThreadCursoredList()

Construct an empty list so that its internal data array has size 10 and its standard capacity increment is zero.

public
ThreadCursoredList(int initialCapacity)

Construct an empty list with the specified initial capacity and with its capacity increment equal to zero.

public
ThreadCursoredList(int initialCapacity, int capacityIncrement)

Construct an empty list with the specified initial capacity and capacity increment.

Method Summary

Modifier and TypeMethod and Description
public synchronized void
add(int
index at which the specified element is to be inserted
index
,
E
element to be inserted
element
)

Overrides java.util.Vector.add.

Implements java.util.List.add.

Add and notify any waiters that there are new elements.
public synchronized boolean
add(E
element to be appended to this Vector
element
)

Overrides java.util.Vector.add.

Implements java.util.List.add, java.util.Collection.add.

Add and notify any waiters that there are new elements.
public synchronized boolean
addAll(int
index at which to insert the first element from the specified collection
index
,
Collection<? extends E>
elements to be inserted into this Vector
collection
)

Overrides java.util.Vector.addAll.

Implements java.util.List.addAll.

Add and notify any waiters that there are new elements.
public synchronized boolean
addAll(Collection<? extends E>
elements to be inserted into this Vector
collection
)

Overrides java.util.Vector.addAll.

Implements java.util.List.addAll, java.util.Collection.addAll.

Add and notify any waiters that there are new elements.
public synchronized void
addElement(E
the component to be added
object
)

Overrides java.util.Vector.addElement.

Add and notify any waiters that there are new elements.
public synchronized void
clear()

Overrides java.util.Vector.clear.

Implements java.util.List.clear, java.util.Collection.clear.

First wait until complete.
public synchronized Object
clone()

Overrides java.util.Vector.clone.

First wait until complete.
public synchronized boolean
contains(Object
element whose presence in this vector is to be tested
element
)

Overrides java.util.Vector.contains.

Implements java.util.List.contains, java.util.Collection.contains.

If it does not contain the object must wait until it is complete.
public synchronized boolean
containsAll(Collection<?>
a collection whose elements will be tested for containment in this Vector
collection
)

Overrides java.util.Vector.containsAll.

Implements java.util.List.containsAll, java.util.Collection.containsAll.

If it does not contain the object must wait until it is complete.
public synchronized void
copyInto(Object[]
the array into which the components get copied
array
)

Overrides java.util.Vector.copyInto.

First wait until complete.
public synchronized E
elementAt(int
an index into this vector
index
)

Overrides java.util.Vector.elementAt.

If the index is beyond the size wait until complete.
public Enumeration<E>
elements()

Overrides java.util.Vector.elements.

Allow concurrent streaming of the elements.
public synchronized boolean
equals(Object
the Object to be compared for equality with this Vector
object
)

Overrides java.util.Vector.equals.

Implements java.util.List.equals, java.util.Collection.equals.

First wait until complete.
public synchronized E
firstElement()

Overrides java.util.Vector.firstElement.

Wait until has an element or is complete.
public synchronized E
get(int
index of the element to return
index
)

Overrides java.util.Vector.get.

Implements java.util.List.get.

Wait until has the element or is complete.
public RuntimeException
getException()

Return any exception that was throw from concurrent population thread.

protected int
public boolean
hasException()

Return if any exception that was throw from concurrent population thread.

public synchronized int
public int
indexOf(Object
element to search for
element
)

Overrides java.util.Vector.indexOf.

Implements java.util.List.indexOf.

If does not contain the object wait until complete.
public synchronized int
indexOf(Object
element to search for
element
,
int
index to start searching from
index
)

Overrides java.util.Vector.indexOf.

If does not contain the object wait until complete.
public synchronized void
insertElementAt(E
the component to insert
element
,
int
where to insert the new component
index
)

Overrides java.util.Vector.insertElementAt.

Add the element a notify any waiters that there are new elements.
public synchronized boolean
isComplete()

Return if the list is complete.

public boolean
isEmpty()

Overrides java.util.Vector.isEmpty.

Implements java.util.List.isEmpty, java.util.Collection.isEmpty.

If empty wait until an element has been added or is complete.
public Iterator<E>
iterator()

Overrides java.util.Vector.iterator.

Implements java.util.List.iterator, java.util.Collection.iterator.

Returns an iterator over the elements in this list in proper sequence.
public synchronized E
lastElement()

Overrides java.util.Vector.lastElement.

First wait until complete.
public int
lastIndexOf(Object
element to search for
element
)

Overrides java.util.Vector.lastIndexOf.

Implements java.util.List.lastIndexOf.

First wait until complete.
public synchronized int
lastIndexOf(Object
element to search for
element
,
int
index to start searching backwards from
index
)

Overrides java.util.Vector.lastIndexOf.

First wait until complete.
public ListIterator<E>
listIterator()

Overrides java.util.Vector.listIterator.

Implements java.util.List.listIterator.

Returns a list iterator over the elements in this list (in proper sequence).
public ListIterator<E>
listIterator(final int
index of the first element to be returned from the list iterator (by a call to next)
index
)

Overrides java.util.Vector.listIterator.

Implements java.util.List.listIterator.

Iterate while waiting at end until complete.
public synchronized E
remove(int
the index of the element to be removed
index
)

Overrides java.util.Vector.remove.

Implements java.util.List.remove.

If index is missing wait until is there.
public boolean
remove(Object
element to be removed from this Vector, if present
element
)

Overrides java.util.Vector.remove.

Implements java.util.List.remove, java.util.Collection.remove.

If object is missing wait until complete.
public synchronized boolean
removeAll(Collection<?>
a collection of elements to be removed from the Vector
collection
)

Overrides java.util.Vector.removeAll.

Implements java.util.List.removeAll, java.util.Collection.removeAll.

First wait until complete.
public synchronized void
removeAllElements()

Overrides java.util.Vector.removeAllElements.

First wait until complete.
public synchronized boolean
removeElement(Object
the component to be removed
element
)

Overrides java.util.Vector.removeElement.

If missing wait until complete.
public synchronized void
removeElementAt(int
the index of the object to remove
index
)

Overrides java.util.Vector.removeElementAt.

If index is missing wait until reasched or complete.
public synchronized boolean
retainAll(Collection<?>
a collection of elements to be retained in this Vector (all other elements are removed)
collection
)

Overrides java.util.Vector.retainAll.

Implements java.util.List.retainAll, java.util.Collection.retainAll.

First wait until complete.
public synchronized E
set(int
index of the element to replace
index
,
E
element to be stored at the specified position
element
)

Overrides java.util.Vector.set.

Implements java.util.List.set.

If index is missing wait until reached or complete.
public synchronized void
setElementAt(E
what the component is to be set to
element
,
int
the specified index
index
)

Overrides java.util.Vector.setElementAt.

If index is missing wait until reached or complete.
public synchronized void
setIsComplete(boolean isComplete)

Set the list complete and notify any waiters.

public int
size()

Overrides java.util.Vector.size.

Implements java.util.List.size, java.util.Collection.size.

First wait until complete.
public List<E>
subList(int
low endpoint (inclusive) of the subList
fromIndex
,
int
high endpoint (exclusive) of the subList
toIndex
)

Overrides java.util.Vector.subList.

Implements java.util.List.subList.

If index is missing wait until reached or complete.
public synchronized void
throwException(RuntimeException exception)

Record that the population thread hit an exception, that should be thrown to the processing thread on the next access.

public synchronized Object[]
toArray()

Overrides java.util.Vector.toArray.

Implements java.util.List.toArray, java.util.Collection.toArray.

First wait until complete.
public synchronized <T> T[]
toArray(T[]
the array into which the elements of the Vector are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
array
)

Overrides java.util.Vector.toArray.

Implements java.util.List.toArray, java.util.Collection.toArray.

First wait until complete.
public synchronized String
toString()

Overrides java.util.Vector.toString.

First wait until complete.
public synchronized void
trimToSize()

Overrides java.util.Vector.trimToSize.

First wait until complete.
public synchronized void
waitUntilAdd()

Wait until a new element has been added.

public synchronized void
waitUntilComplete()

Wait until the list has been fully populated.

Inherited from java.util.Vector:
capacityensureCapacityforEachremoveIfremoveRangereplaceAllsetSizesortspliterator

Field Detail

exceptionback to summary
protected RuntimeException exception

Used to throw exception that occur from the concurrent population thread.

isCompleteback to summary
protected boolean isComplete

Store if the list is fully populated.

Constructor Detail

ThreadCursoredListback to summary
public ThreadCursoredList()

Construct an empty list so that its internal data array has size 10 and its standard capacity increment is zero.

ThreadCursoredListback to summary
public ThreadCursoredList(int initialCapacity)

Construct an empty list with the specified initial capacity and with its capacity increment equal to zero.

ThreadCursoredListback to summary
public ThreadCursoredList(int initialCapacity, int capacityIncrement)

Construct an empty list with the specified initial capacity and capacity increment.

Method Detail

addback to summary
public synchronized void add(int index, E element)

Overrides java.util.Vector.add.

Implements java.util.List.add.

Add and notify any waiters that there are new elements.

Parameters
index:int

Doc from java.util.Vector.add.

index at which the specified element is to be inserted

element:E

Doc from java.util.Vector.add.

element to be inserted

Annotations
@Override
addback to summary
public synchronized boolean add(E element)

Overrides java.util.Vector.add.

Implements java.util.List.add, java.util.Collection.add.

Add and notify any waiters that there are new elements.

Parameters
element:E

Doc from java.util.Vector.add.

element to be appended to this Vector

Returns:boolean

Doc from java.util.Vector.add.

true (as specified by Collection#add)

Annotations
@Override
addAllback to summary
public synchronized boolean addAll(int index, Collection<? extends E> collection)

Overrides java.util.Vector.addAll.

Implements java.util.List.addAll.

Add and notify any waiters that there are new elements.

Parameters
index:int

Doc from java.util.Vector.addAll.

index at which to insert the first element from the specified collection

collection:Collection<? extends E>

Doc from java.util.Vector.addAll.

elements to be inserted into this Vector

Returns:boolean

Doc from java.util.Vector.addAll.

true if this Vector changed as a result of the call

Annotations
@Override
addAllback to summary
public synchronized boolean addAll(Collection<? extends E> collection)

Overrides java.util.Vector.addAll.

Implements java.util.List.addAll, java.util.Collection.addAll.

Add and notify any waiters that there are new elements.

Parameters
collection:Collection<? extends E>

Doc from java.util.Vector.addAll.

elements to be inserted into this Vector

Returns:boolean

Doc from java.util.Vector.addAll.

true if this Vector changed as a result of the call

Annotations
@Override
addElementback to summary
public synchronized void addElement(E object)

Overrides java.util.Vector.addElement.

Add and notify any waiters that there are new elements.

Parameters
object:E

Doc from java.util.Vector.addElement.

the component to be added

Annotations
@Override
clearback to summary
public synchronized void clear()

Overrides java.util.Vector.clear.

Implements java.util.List.clear, java.util.Collection.clear.

First wait until complete.

Annotations
@Override
cloneback to summary
public synchronized Object clone()

Overrides java.util.Vector.clone.

First wait until complete.

Returns:Object

Doc from java.util.Vector.clone.

a clone of this vector

Annotations
@Override
containsback to summary
public synchronized boolean contains(Object element)

Overrides java.util.Vector.contains.

Implements java.util.List.contains, java.util.Collection.contains.

If it does not contain the object must wait until it is complete.

Parameters
element:Object

Doc from java.util.Vector.contains.

element whose presence in this vector is to be tested

Returns:boolean

Doc from java.util.Vector.contains.

true if this vector contains the specified element

Annotations
@Override
containsAllback to summary
public synchronized boolean containsAll(Collection<?> collection)

Overrides java.util.Vector.containsAll.

Implements java.util.List.containsAll, java.util.Collection.containsAll.

If it does not contain the object must wait until it is complete.

Parameters
collection:Collection<?>

Doc from java.util.Vector.containsAll.

a collection whose elements will be tested for containment in this Vector

Returns:boolean

Doc from java.util.Vector.containsAll.

true if this Vector contains all of the elements in the specified collection

Annotations
@Override
copyIntoback to summary
public synchronized void copyInto(Object[] array)

Overrides java.util.Vector.copyInto.

First wait until complete.

Parameters
array:Object[]

Doc from java.util.Vector.copyInto.

the array into which the components get copied

Annotations
@Override
elementAtback to summary
public synchronized E elementAt(int index)

Overrides java.util.Vector.elementAt.

If the index is beyond the size wait until complete.

Parameters
index:int

Doc from java.util.Vector.elementAt.

an index into this vector

Returns:E

Doc from java.util.Vector.elementAt.

the component at the specified index

Annotations
@Override
elementsback to summary
public Enumeration<E> elements()

Overrides java.util.Vector.elements.

Allow concurrent streaming of the elements.

Returns:Enumeration<E>

Doc from java.util.Vector.elements.

an enumeration of the components of this vector

Annotations
@Override
equalsback to summary
public synchronized boolean equals(Object object)

Overrides java.util.Vector.equals.

Implements java.util.List.equals, java.util.Collection.equals.

First wait until complete.

Parameters
object:Object

Doc from java.util.Vector.equals.

the Object to be compared for equality with this Vector

Returns:boolean

Doc from java.util.Vector.equals.

true if the specified Object is equal to this Vector

Annotations
@Override
firstElementback to summary
public synchronized E firstElement()

Overrides java.util.Vector.firstElement.

Wait until has an element or is complete.

Returns:E

Doc from java.util.Vector.firstElement.

the first component of this vector

Annotations
@Override
getback to summary
public synchronized E get(int index)

Overrides java.util.Vector.get.

Implements java.util.List.get.

Wait until has the element or is complete.

Parameters
index:int

Doc from java.util.Vector.get.

index of the element to return

Returns:E

Doc from java.util.Vector.get.

object at the specified index

Annotations
@Override
getExceptionback to summary
public RuntimeException getException()

Return any exception that was throw from concurrent population thread.

getSizeback to summary
protected int getSize()
hasExceptionback to summary
public boolean hasException()

Return if any exception that was throw from concurrent population thread.

hashCodeback to summary
public synchronized int hashCode()

Overrides java.util.Vector.hashCode.

Implements java.util.List.hashCode, java.util.Collection.hashCode.

First wait until complete.

Returns:int

Doc from java.util.List.hashCode.

the hash code value for this list

Annotations
@Override
indexOfback to summary
public int indexOf(Object element)

Overrides java.util.Vector.indexOf.

Implements java.util.List.indexOf.

If does not contain the object wait until complete.

Parameters
element:Object

Doc from java.util.Vector.indexOf.

element to search for

Returns:int

Doc from java.util.Vector.indexOf.

the index of the first occurrence of the specified element in this vector, or -1 if this vector does not contain the element

Annotations
@Override
indexOfback to summary
public synchronized int indexOf(Object element, int index)

Overrides java.util.Vector.indexOf.

If does not contain the object wait until complete.

Parameters
element:Object

Doc from java.util.Vector.indexOf.

element to search for

index:int

Doc from java.util.Vector.indexOf.

index to start searching from

Returns:int

Doc from java.util.Vector.indexOf.

the index of the first occurrence of the element in this vector at position index or later in the vector; -1 if the element is not found.

Annotations
@Override
insertElementAtback to summary
public synchronized void insertElementAt(E element, int index)

Overrides java.util.Vector.insertElementAt.

Add the element a notify any waiters that there are new elements.

Parameters
element:E

Doc from java.util.Vector.insertElementAt.

the component to insert

index:int

Doc from java.util.Vector.insertElementAt.

where to insert the new component

Annotations
@Override
isCompleteback to summary
public synchronized boolean isComplete()

Return if the list is complete. If an exception was thrown during the concurrent population throw the exception.

isEmptyback to summary
public boolean isEmpty()

Overrides java.util.Vector.isEmpty.

Implements java.util.List.isEmpty, java.util.Collection.isEmpty.

If empty wait until an element has been added or is complete.

Returns:boolean

Doc from java.util.Vector.isEmpty.

true if and only if this vector has no components, that is, its size is zero; false otherwise.

Annotations
@Override
iteratorback to summary
public Iterator<E> iterator()

Overrides java.util.Vector.iterator.

Implements java.util.List.iterator, java.util.Collection.iterator.

Doc from java.util.Vector.iterator.

Returns an iterator over the elements in this list in proper sequence.

The returned iterator is fail-fast.

Returns:Iterator<E>

an iterator over the elements in this list in proper sequence

Annotations
@Override
lastElementback to summary
public synchronized E lastElement()

Overrides java.util.Vector.lastElement.

First wait until complete.

Returns:E

Doc from java.util.Vector.lastElement.

the last component of the vector, i.e., the component at index size() - 1

Annotations
@Override
lastIndexOfback to summary
public int lastIndexOf(Object element)

Overrides java.util.Vector.lastIndexOf.

Implements java.util.List.lastIndexOf.

First wait until complete.

Parameters
element:Object

Doc from java.util.Vector.lastIndexOf.

element to search for

Returns:int

Doc from java.util.Vector.lastIndexOf.

the index of the last occurrence of the specified element in this vector, or -1 if this vector does not contain the element

Annotations
@Override
lastIndexOfback to summary
public synchronized int lastIndexOf(Object element, int index)

Overrides java.util.Vector.lastIndexOf.

First wait until complete.

Parameters
element:Object

Doc from java.util.Vector.lastIndexOf.

element to search for

index:int

Doc from java.util.Vector.lastIndexOf.

index to start searching backwards from

Returns:int

Doc from java.util.Vector.lastIndexOf.

the index of the last occurrence of the element at position less than or equal to index in this vector; -1 if the element is not found.

Annotations
@Override
listIteratorback to summary
public ListIterator<E> listIterator()

Overrides java.util.Vector.listIterator.

Implements java.util.List.listIterator.

Doc from java.util.Vector.listIterator.

Returns a list iterator over the elements in this list (in proper sequence).

The returned list iterator is fail-fast.

Returns:ListIterator<E>

Doc from java.util.List.listIterator.

a list iterator over the elements in this list (in proper sequence)

Annotations
@Override
listIteratorback to summary
public ListIterator<E> listIterator(final int index)

Overrides java.util.Vector.listIterator.

Implements java.util.List.listIterator.

Iterate while waiting at end until complete.

Parameters
index:int

Doc from java.util.List.listIterator.

index of the first element to be returned from the list iterator (by a call to next)

Returns:ListIterator<E>

Doc from java.util.List.listIterator.

a list iterator over the elements in this list (in proper sequence), starting at the specified position in the list

Annotations
@Override
removeback to summary
public synchronized E remove(int index)

Overrides java.util.Vector.remove.

Implements java.util.List.remove.

If index is missing wait until is there.

Parameters
index:int

Doc from java.util.Vector.remove.

the index of the element to be removed

Returns:E

Doc from java.util.Vector.remove.

element that was removed

Annotations
@Override
removeback to summary
public boolean remove(Object element)

Overrides java.util.Vector.remove.

Implements java.util.List.remove, java.util.Collection.remove.

If object is missing wait until complete.

Parameters
element:Object

Doc from java.util.Vector.remove.

element to be removed from this Vector, if present

Returns:boolean

Doc from java.util.Vector.remove.

true if the Vector contained the specified element

Annotations
@Override
removeAllback to summary
public synchronized boolean removeAll(Collection<?> collection)

Overrides java.util.Vector.removeAll.

Implements java.util.List.removeAll, java.util.Collection.removeAll.

First wait until complete.

Parameters
collection:Collection<?>

Doc from java.util.Vector.removeAll.

a collection of elements to be removed from the Vector

Returns:boolean

Doc from java.util.Vector.removeAll.

true if this Vector changed as a result of the call

Annotations
@Override
removeAllElementsback to summary
public synchronized void removeAllElements()

Overrides java.util.Vector.removeAllElements.

First wait until complete.

Annotations
@Override
removeElementback to summary
public synchronized boolean removeElement(Object element)

Overrides java.util.Vector.removeElement.

If missing wait until complete.

Parameters
element:Object

Doc from java.util.Vector.removeElement.

the component to be removed

Returns:boolean

Doc from java.util.Vector.removeElement.

true if the argument was a component of this vector; false otherwise.

Annotations
@Override
removeElementAtback to summary
public synchronized void removeElementAt(int index)

Overrides java.util.Vector.removeElementAt.

If index is missing wait until reasched or complete.

Parameters
index:int

Doc from java.util.Vector.removeElementAt.

the index of the object to remove

Annotations
@Override
retainAllback to summary
public synchronized boolean retainAll(Collection<?> collection)

Overrides java.util.Vector.retainAll.

Implements java.util.List.retainAll, java.util.Collection.retainAll.

First wait until complete.

Parameters
collection:Collection<?>

Doc from java.util.Vector.retainAll.

a collection of elements to be retained in this Vector (all other elements are removed)

Returns:boolean

Doc from java.util.Vector.retainAll.

true if this Vector changed as a result of the call

Annotations
@Override
setback to summary
public synchronized E set(int index, E element)

Overrides java.util.Vector.set.

Implements java.util.List.set.

If index is missing wait until reached or complete.

Parameters
index:int

Doc from java.util.Vector.set.

index of the element to replace

element:E

Doc from java.util.Vector.set.

element to be stored at the specified position

Returns:E

Doc from java.util.Vector.set.

the element previously at the specified position

Annotations
@Override
setElementAtback to summary
public synchronized void setElementAt(E element, int index)

Overrides java.util.Vector.setElementAt.

If index is missing wait until reached or complete.

Parameters
element:E

Doc from java.util.Vector.setElementAt.

what the component is to be set to

index:int

Doc from java.util.Vector.setElementAt.

the specified index

Annotations
@Override
setIsCompleteback to summary
public synchronized void setIsComplete(boolean isComplete)

Set the list complete and notify any waiters.

sizeback to summary
public int size()

Overrides java.util.Vector.size.

Implements java.util.List.size, java.util.Collection.size.

First wait until complete.

Returns:int

Doc from java.util.Vector.size.

the number of components in this vector

Annotations
@Override
subListback to summary
public List<E> subList(int fromIndex, int toIndex)

Overrides java.util.Vector.subList.

Implements java.util.List.subList.

If index is missing wait until reached or complete.

Parameters
fromIndex:int

Doc from java.util.Vector.subList.

low endpoint (inclusive) of the subList

toIndex:int

Doc from java.util.Vector.subList.

high endpoint (exclusive) of the subList

Returns:List<E>

Doc from java.util.Vector.subList.

a view of the specified range within this List

Annotations
@Override
throwExceptionback to summary
public synchronized void throwException(RuntimeException exception)

Record that the population thread hit an exception, that should be thrown to the processing thread on the next access. This also records the list and complete.

toArrayback to summary
public synchronized Object[] toArray()

Overrides java.util.Vector.toArray.

Implements java.util.List.toArray, java.util.Collection.toArray.

First wait until complete.

Returns:Object[]

Doc from java.util.List.toArray.

an array containing all of the elements in this list in proper sequence

Annotations
@Override
toArrayback to summary
public synchronized <T> T[] toArray(T[] array)

Overrides java.util.Vector.toArray.

Implements java.util.List.toArray, java.util.Collection.toArray.

First wait until complete.

Parameters
<T>

Doc from java.util.Vector.toArray. type of array elements. The same type as <E> or a supertype of <E>.

array:T[]

Doc from java.util.Vector.toArray.

the array into which the elements of the Vector are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.

Returns:T[]

Doc from java.util.Vector.toArray.

an array containing the elements of the Vector

Annotations
@Override
toStringback to summary
public synchronized String toString()

Overrides java.util.Vector.toString.

First wait until complete.

Returns:String

Doc from java.util.AbstractCollection.toString.

a string representation of this collection

Annotations
@Override
trimToSizeback to summary
public synchronized void trimToSize()

Overrides java.util.Vector.trimToSize.

First wait until complete.

Annotations
@Override
waitUntilAddback to summary
public synchronized void waitUntilAdd()

Wait until a new element has been added.

waitUntilCompleteback to summary
public synchronized void waitUntilComplete()

Wait until the list has been fully populated.