blob: 2bf9517368ae07974a5381bd67aab53659927c7a [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_11) on Tue Feb 12 17:38:23 PST 2008 -->
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>
ConcurrentLinkedQueue (OpenJPA 1.0.2 API)
</TITLE>
<META NAME="keywords" CONTENT="org.apache.openjpa.lib.util.concurrent.ConcurrentLinkedQueue class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="ConcurrentLinkedQueue (OpenJPA 1.0.2 API)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ConcurrentLinkedQueue.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentHashSet.html" title="class in org.apache.openjpa.lib.util.concurrent"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentMap.html" title="interface in org.apache.openjpa.lib.util.concurrent"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="ConcurrentLinkedQueue.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.openjpa.lib.util.concurrent</FONT>
<BR>
Class ConcurrentLinkedQueue</H2>
<PRE>
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">java.util.AbstractCollection</A>
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.openjpa.lib.util.concurrent.ConcurrentLinkedQueue</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html" title="class or interface in java.lang">Iterable</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A>, <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html" title="interface in org.apache.openjpa.lib.util.concurrent">Queue</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>ConcurrentLinkedQueue</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A><DT>implements <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html" title="interface in org.apache.openjpa.lib.util.concurrent">Queue</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A></DL>
</PRE>
<P>
An unbounded thread-safe <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html" title="interface in org.apache.openjpa.lib.util.concurrent">queue</A> based on linked nodes.
This queue orders elements FIFO(first-in-first-out).
The <em>head</em> of the queue is that element that has been on the
queue the longest time.
The <em>tail</em> of the queue is that element that has been on the
queue the shortest time. New elements
are inserted at the tail of the queue, and the queue retrieval
operations obtain elements at the head of the queue.
A <tt>ConcurrentLinkedQueue</tt> is an appropriate choice when
many threads will share access to a common collection.
This queue does not permit <tt>null</tt> elements.
This implementation employs an efficient &quot;wait-free&quot;
algorithm based on one described in <a
href="http://www.cs.rochester.edu/u/michael/PODC96.html"> Simple,
Fast, and Practical Non-Blocking and Blocking Concurrent Queue
Algorithms</a> by Maged M. Michael and Michael L. Scott.
Beware that, unlike in most collections, the <tt>size</tt> method
is <em>NOT</em> a constant-time operation. Because of the
asynchronous nature of these queues, determining the current number
of elements requires a traversal of the elements.
This class and its iterator implement all of the
<em>optional</em> methods of the <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util"><CODE>Collection</CODE></A> and <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util"><CODE>Iterator</CODE></A> interfaces. Memory consistency effects: As with other concurrent
collections, actions in a thread prior to placing an object into a
<code>ConcurrentLinkedQueue</code>
<a href="package-summary.html#MemoryVisibility"><i>happen-before</i></a>
actions subsequent to the access or removal of that element from
the <code>ConcurrentLinkedQueue</code> in another thread.
This class is a member of the
<a href="../../../../../../../guide/collections/index.html">
Java Collections Framework</a>.
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>1.5</DD>
<DT><B>Author:</B></DT>
<DD>Doug Lea</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../../../serialized-form.html#org.apache.openjpa.lib.util.concurrent.ConcurrentLinkedQueue">Serialized Form</A></DL>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html#ConcurrentLinkedQueue()">ConcurrentLinkedQueue</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html#ConcurrentLinkedQueue(java.util.Collection)">ConcurrentLinkedQueue</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A>&nbsp;c)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <tt>ConcurrentLinkedQueue</tt>
initially containing the elements of the given collection,
added in traversal order of the collection's iterator.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html#add(java.lang.Object)">add</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;e)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inserts the specified element at the tail of this queue.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html#addAll(java.util.Collection)">addAll</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A>&nbsp;c)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds all of the elements in the specified collection to this
queue.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html#clear()">clear</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all of the elements from this queue.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html#contains(java.lang.Object)">contains</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;o)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <tt>true</tt> if this queue contains the specified element.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html#element()">element</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves, but does not remove, the head of this queue.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html#isEmpty()">isEmpty</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <tt>true</tt> if this queue contains no elements.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html#iterator()">iterator</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an iterator over the elements in this queue in proper sequence.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html#offer(java.lang.Object)">offer</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;e)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inserts the specified element at the tail of this queue.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html#peek()">peek</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves, but does not remove, the head of this queue,
or returns <tt>null</tt> if this queue is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html#poll()">poll</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves and removes the head of this queue,
or returns <tt>null</tt> if this queue is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html#remove()">remove</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves and removes the head of this queue.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html#remove(java.lang.Object)">remove</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;o)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a single instance of the specified element from this queue,
if it is present.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html#size()">size</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of elements in this queue.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html#toArray()">toArray</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html#toArray(java.lang.Object[])">toArray</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]&nbsp;a)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.util.AbstractCollection"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.util.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#containsAll(java.util.Collection)" title="class or interface in java.util">containsAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#removeAll(java.util.Collection)" title="class or interface in java.util">removeAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#retainAll(java.util.Collection)" title="class or interface in java.util">retainAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#toString()" title="class or interface in java.util">toString</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.openjpa.lib.util.concurrent.Queue"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface org.apache.openjpa.lib.util.concurrent.<A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html" title="interface in org.apache.openjpa.lib.util.concurrent">Queue</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html#element()">element</A>, <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html#remove()">remove</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.util.Collection"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface java.util.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#addAll(java.util.Collection)" title="class or interface in java.util">addAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#clear()" title="class or interface in java.util">clear</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#containsAll(java.util.Collection)" title="class or interface in java.util">containsAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#equals(java.lang.Object)" title="class or interface in java.util">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#hashCode()" title="class or interface in java.util">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#removeAll(java.util.Collection)" title="class or interface in java.util">removeAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#retainAll(java.util.Collection)" title="class or interface in java.util">retainAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#toArray()" title="class or interface in java.util">toArray</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#toArray(T[])" title="class or interface in java.util">toArray</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="ConcurrentLinkedQueue()"><!-- --></A><H3>
ConcurrentLinkedQueue</H3>
<PRE>
public <B>ConcurrentLinkedQueue</B>()</PRE>
<DL>
</DL>
<HR>
<A NAME="ConcurrentLinkedQueue(java.util.Collection)"><!-- --></A><H3>
ConcurrentLinkedQueue</H3>
<PRE>
public <B>ConcurrentLinkedQueue</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A>&nbsp;c)</PRE>
<DL>
<DD>Creates a <tt>ConcurrentLinkedQueue</tt>
initially containing the elements of the given collection,
added in traversal order of the collection's iterator.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>c</CODE> - the collection of elements to initially contain
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the specified collection or any
of its elements are null</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="add(java.lang.Object)"><!-- --></A><H3>
add</H3>
<PRE>
public boolean <B>add</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;e)</PRE>
<DL>
<DD>Inserts the specified element at the tail of this queue.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#add(E)" title="class or interface in java.util">add</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html#add(java.lang.Object)">add</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html" title="interface in org.apache.openjpa.lib.util.concurrent">Queue</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>e</CODE> - the element to add
<DT><B>Returns:</B><DD><tt>true</tt> (as specified by <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#add(E)" title="class or interface in java.util"><CODE>Collection.add(E)</CODE></A>)
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the specified element is null</DL>
</DD>
</DL>
<HR>
<A NAME="offer(java.lang.Object)"><!-- --></A><H3>
offer</H3>
<PRE>
public boolean <B>offer</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;e)</PRE>
<DL>
<DD>Inserts the specified element at the tail of this queue.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html#offer(java.lang.Object)">offer</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html" title="interface in org.apache.openjpa.lib.util.concurrent">Queue</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>e</CODE> - the element to add
<DT><B>Returns:</B><DD><tt>true</tt> (as specified by <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html#offer(java.lang.Object)"><CODE>Queue.offer(java.lang.Object)</CODE></A>)
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the specified element is null</DL>
</DD>
</DL>
<HR>
<A NAME="poll()"><!-- --></A><H3>
poll</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>poll</B>()</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html#poll()">Queue</A></CODE></B></DD>
<DD>Retrieves and removes the head of this queue,
or returns <tt>null</tt> if this queue is empty.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html#poll()">poll</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html" title="interface in org.apache.openjpa.lib.util.concurrent">Queue</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the head of this queue, or <tt>null</tt> if this queue is empty</DL>
</DD>
</DL>
<HR>
<A NAME="peek()"><!-- --></A><H3>
peek</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>peek</B>()</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html#peek()">Queue</A></CODE></B></DD>
<DD>Retrieves, but does not remove, the head of this queue,
or returns <tt>null</tt> if this queue is empty.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html#peek()">peek</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html" title="interface in org.apache.openjpa.lib.util.concurrent">Queue</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the head of this queue, or <tt>null</tt> if this queue is empty</DL>
</DD>
</DL>
<HR>
<A NAME="isEmpty()"><!-- --></A><H3>
isEmpty</H3>
<PRE>
public boolean <B>isEmpty</B>()</PRE>
<DL>
<DD>Returns <tt>true</tt> if this queue contains no elements.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#isEmpty()" title="class or interface in java.util">isEmpty</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#isEmpty()" title="class or interface in java.util">isEmpty</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD><tt>true</tt> if this queue contains no elements</DL>
</DD>
</DL>
<HR>
<A NAME="size()"><!-- --></A><H3>
size</H3>
<PRE>
public int <B>size</B>()</PRE>
<DL>
<DD>Returns the number of elements in this queue. If this queue
contains more than <tt>Integer.MAX_VALUE</tt> elements, returns
<tt>Integer.MAX_VALUE</tt>.
Beware that, unlike in most collections, this method is
<em>NOT</em> a constant-time operation. Because of the
asynchronous nature of these queues, determining the current
number of elements requires an O(n) traversal.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#size()" title="class or interface in java.util">size</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#size()" title="class or interface in java.util">size</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the number of elements in this queue</DL>
</DD>
</DL>
<HR>
<A NAME="contains(java.lang.Object)"><!-- --></A><H3>
contains</H3>
<PRE>
public boolean <B>contains</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;o)</PRE>
<DL>
<DD>Returns <tt>true</tt> if this queue contains the specified element.
More formally, returns <tt>true</tt> if and only if this queue contains
at least one element <tt>e</tt> such that <tt>o.equals(e)</tt>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#contains(java.lang.Object)" title="class or interface in java.util">contains</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#contains(java.lang.Object)" title="class or interface in java.util">contains</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>o</CODE> - object to be checked for containment in this queue
<DT><B>Returns:</B><DD><tt>true</tt> if this queue contains the specified element</DL>
</DD>
</DL>
<HR>
<A NAME="remove(java.lang.Object)"><!-- --></A><H3>
remove</H3>
<PRE>
public boolean <B>remove</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;o)</PRE>
<DL>
<DD>Removes a single instance of the specified element from this queue,
if it is present. More formally, removes an element <tt>e</tt> such
that <tt>o.equals(e)</tt>, if this queue contains one or more such
elements.
Returns <tt>true</tt> if this queue contained the specified element
(or equivalently, if this queue changed as a result of the call).
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#remove(java.lang.Object)" title="class or interface in java.util">remove</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#remove(java.lang.Object)" title="class or interface in java.util">remove</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>o</CODE> - element to be removed from this queue, if present
<DT><B>Returns:</B><DD><tt>true</tt> if this queue changed as a result of the call</DL>
</DD>
</DL>
<HR>
<A NAME="iterator()"><!-- --></A><H3>
iterator</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> <B>iterator</B>()</PRE>
<DL>
<DD>Returns an iterator over the elements in this queue in proper sequence.
The returned iterator is a "weakly consistent" iterator that
will never throw <CODE>ConcurrentModificationException</CODE>,
and guarantees to traverse elements as they existed upon
construction of the iterator, and may(but is not guaranteed to)
reflect any modifications subsequent to construction.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html#iterator()" title="class or interface in java.lang">iterator</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html" title="class or interface in java.lang">Iterable</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#iterator()" title="class or interface in java.util">iterator</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#iterator()" title="class or interface in java.util">iterator</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>an iterator over the elements in this queue in proper sequence</DL>
</DD>
</DL>
<HR>
<A NAME="remove()"><!-- --></A><H3>
remove</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>remove</B>()</PRE>
<DL>
<DD>Retrieves and removes the head of this queue. This method differs
from <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html#poll()"><CODE>poll</CODE></A> only in that it throws an exception if this
queue is empty. This implementation returns the result of <tt>poll</tt>
unless the queue is empty.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html#remove()">remove</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html" title="interface in org.apache.openjpa.lib.util.concurrent">Queue</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the head of this queue
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/NoSuchElementException.html" title="class or interface in java.util">NoSuchElementException</A></CODE> - if this queue is empty</DL>
</DD>
</DL>
<HR>
<A NAME="element()"><!-- --></A><H3>
element</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>element</B>()</PRE>
<DL>
<DD>Retrieves, but does not remove, the head of this queue. This method
differs from <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html#peek()"><CODE>peek</CODE></A> only in that it throws an exception if
this queue is empty.
This implementation returns the result of <tt>peek</tt>
unless the queue is empty.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html#element()">element</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html" title="interface in org.apache.openjpa.lib.util.concurrent">Queue</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the head of this queue
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/NoSuchElementException.html" title="class or interface in java.util">NoSuchElementException</A></CODE> - if this queue is empty</DL>
</DD>
</DL>
<HR>
<A NAME="clear()"><!-- --></A><H3>
clear</H3>
<PRE>
public void <B>clear</B>()</PRE>
<DL>
<DD>Removes all of the elements from this queue.
The queue will be empty after this call returns.
This implementation repeatedly invokes <A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/Queue.html#poll()"><CODE>poll</CODE></A> until it
returns <tt>null</tt>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#clear()" title="class or interface in java.util">clear</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#clear()" title="class or interface in java.util">clear</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addAll(java.util.Collection)"><!-- --></A><H3>
addAll</H3>
<PRE>
public boolean <B>addAll</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A>&nbsp;c)</PRE>
<DL>
<DD>Adds all of the elements in the specified collection to this
queue. Attempts to addAll of a queue to itself result in
<tt>IllegalArgumentException</tt>. Further, the behavior of
this operation is undefined if the specified collection is
modified while the operation is in progress.
This implementation iterates over the specified collection,
and adds each element returned by the iterator to this
queue, in turn. A runtime exception encountered while
trying to add an element(including, in particular, a
<tt>null</tt> element) may result in only some of the elements
having been successfully added when the associated exception is thrown.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#addAll(java.util.Collection)" title="class or interface in java.util">addAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#addAll(java.util.Collection)" title="class or interface in java.util">addAll</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>c</CODE> - collection containing elements to be added to this queue
<DT><B>Returns:</B><DD><tt>true</tt> if this queue changed as a result of the call
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassCastException.html" title="class or interface in java.lang">ClassCastException</A></CODE> - if the class of an element of the specified
collection prevents it from being added to this queue
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the specified collection contains a
null element and this queue does not permit null elements,
or if the specified collection is null
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if some property of an element of the
specified collection prevents it from being added to this
queue, or if the specified collection is this queue
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if not all the elements can be added at
this time due to insertion restrictions<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html#add(java.lang.Object)"><CODE>add(Object)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="toArray()"><!-- --></A><H3>
toArray</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[] <B>toArray</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#toArray()" title="class or interface in java.util">toArray</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#toArray()" title="class or interface in java.util">toArray</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="toArray(java.lang.Object[])"><!-- --></A><H3>
toArray</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[] <B>toArray</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]&nbsp;a)</PRE>
<DL>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#toArray(T[])" title="class or interface in java.util">toArray</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#toArray(T[])" title="class or interface in java.util">toArray</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html" title="class or interface in java.util">AbstractCollection</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ConcurrentLinkedQueue.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentHashSet.html" title="class in org.apache.openjpa.lib.util.concurrent"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/openjpa/lib/util/concurrent/ConcurrentMap.html" title="interface in org.apache.openjpa.lib.util.concurrent"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/openjpa/lib/util/concurrent/ConcurrentLinkedQueue.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="ConcurrentLinkedQueue.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright &copy; 2006-2008 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>