EVOLUTION-MANAGER
Edit File: VariableLinkedBlockingQueue.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_91) on Thu Jan 14 10:04:52 GMT 2016 --> <title>VariableLinkedBlockingQueue</title> <meta name="date" content="2016-01-14"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="VariableLinkedBlockingQueue"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../com/rabbitmq/client/impl/ValueWriter.html" title="class in com.rabbitmq.client.impl"><span class="strong">Prev Class</span></a></li> <li><a href="../../../../com/rabbitmq/client/impl/Version.html" title="class in com.rabbitmq.client.impl"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" target="_top">Frames</a></li> <li><a href="VariableLinkedBlockingQueue.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li>Nested | </li> <li>Field | </li> <li><a href="#constructor_summary">Constr</a> | </li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li>Field | </li> <li><a href="#constructor_detail">Constr</a> | </li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">com.rabbitmq.client.impl</div> <h2 title="Class VariableLinkedBlockingQueue" class="title">Class VariableLinkedBlockingQueue<E></h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>java.util.AbstractCollection<E></li> <li> <ul class="inheritance"> <li>java.util.AbstractQueue<E></li> <li> <ul class="inheritance"> <li>com.rabbitmq.client.impl.VariableLinkedBlockingQueue<E></li> </ul> </li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>E</code> - the type of elements held in this collection</dd></dl> <dl> <dt>All Implemented Interfaces:</dt> <dd>java.io.Serializable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.concurrent.BlockingQueue<E>, java.util.Queue<E></dd> </dl> <hr> <br> <pre>public class <span class="strong">VariableLinkedBlockingQueue<E></span> extends java.util.AbstractQueue<E> implements java.util.concurrent.BlockingQueue<E>, java.io.Serializable</pre> <div class="block">A clone of LinkedBlockingQueue with the addition of a <a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#setCapacity(int)"><code>setCapacity(int)</code></a> method, allowing us to change the capacity of the queue while it is in use.<p> The documentation for LinkedBlockingQueue follows...<p> An optionally-bounded blocking queue 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. Linked queues typically have higher throughput than array-based queues but less predictable performance in most concurrent applications. <p> The optional capacity bound constructor argument serves as a way to prevent excessive queue expansion. The capacity, if unspecified, is equal to <code>Integer.MAX_VALUE</code>. Linked nodes are dynamically created upon each insertion unless this would bring the queue above capacity. <p>This class implements all of the <em>optional</em> methods of the <code>Collection</code> and <code>Iterator</code> interfaces. <p>This class is a member of the <a href="../../../../../guide/collections/index.html"> Java Collections Framework</a>.</div> <dl><dt><span class="strong">Since:</span></dt> <dd>1.5</dd> <dt><span class="strong">Author:</span></dt> <dd>Doug Lea</dd> <dt><span class="strong">See Also:</span></dt><dd><a href="../../../../serialized-form.html#com.rabbitmq.client.impl.VariableLinkedBlockingQueue">Serialized Form</a></dd></dl> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd"> </span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#VariableLinkedBlockingQueue()">VariableLinkedBlockingQueue</a></strong>()</code> <div class="block">Creates a <tt>LinkedBlockingQueue</tt> with a capacity of <code>Integer.MAX_VALUE</code>.</div> </td> </tr> <tr class="rowColor"> <td class="colOne"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#VariableLinkedBlockingQueue(java.util.Collection)">VariableLinkedBlockingQueue</a></strong>(java.util.Collection<? extends <a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>> c)</code> <div class="block">Creates a <tt>LinkedBlockingQueue</tt> with a capacity of <code>Integer.MAX_VALUE</code>, initially containing the elements of the given collection, added in traversal order of the collection's iterator.</div> </td> </tr> <tr class="altColor"> <td class="colOne"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#VariableLinkedBlockingQueue(int)">VariableLinkedBlockingQueue</a></strong>(int capacity)</code> <div class="block">Creates a <tt>LinkedBlockingQueue</tt> with the given (fixed) capacity.</div> </td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method_summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span>Methods</span><span class="tabEnd"> </span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#clear()">clear</a></strong>()</code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#drainTo(java.util.Collection)">drainTo</a></strong>(java.util.Collection<? super <a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>> c)</code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#drainTo(java.util.Collection,%20int)">drainTo</a></strong>(java.util.Collection<? super <a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>> c, int maxElements)</code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.util.Iterator<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></td> <td class="colLast"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#iterator()">iterator</a></strong>()</code> <div class="block">Returns an iterator over the elements in this queue in proper sequence.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#offer(E)">offer</a></strong>(<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a> o)</code> <div class="block">Inserts the specified element at the tail of this queue if possible, returning immediately if this queue is full.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#offer(E,%20long,%20java.util.concurrent.TimeUnit)">offer</a></strong>(<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a> o, long timeout, java.util.concurrent.TimeUnit unit)</code> <div class="block">Inserts the specified element at the tail of this queue, waiting if necessary up to the specified wait time for space to become available.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a></code></td> <td class="colLast"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#peek()">peek</a></strong>()</code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a></code></td> <td class="colLast"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#poll()">poll</a></strong>()</code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a></code></td> <td class="colLast"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#poll(long,%20java.util.concurrent.TimeUnit)">poll</a></strong>(long timeout, java.util.concurrent.TimeUnit unit)</code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#put(E)">put</a></strong>(<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a> o)</code> <div class="block">Adds the specified element to the tail of this queue, waiting if necessary for space to become available.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#remainingCapacity()">remainingCapacity</a></strong>()</code> <div class="block">Returns the number of elements that this queue can ideally (in the absence of memory or resource constraints) accept without blocking.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#remove(java.lang.Object)">remove</a></strong>(java.lang.Object o)</code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#setCapacity(int)">setCapacity</a></strong>(int capacity)</code> <div class="block">Set a new capacity for the queue.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#size()">size</a></strong>()</code> <div class="block">Returns the number of elements in this queue.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a></code></td> <td class="colLast"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#take()">take</a></strong>()</code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.lang.Object[]</code></td> <td class="colLast"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#toArray()">toArray</a></strong>()</code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><T> T[]</code></td> <td class="colLast"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#toArray(T[])">toArray</a></strong>(T[] a)</code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html#toString()">toString</a></strong>()</code> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.util.AbstractQueue"> <!-- --> </a> <h3>Methods inherited from class java.util.AbstractQueue</h3> <code>add, addAll, element, remove</code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.util.AbstractCollection"> <!-- --> </a> <h3>Methods inherited from class java.util.AbstractCollection</h3> <code>contains, containsAll, isEmpty, removeAll, retainAll</code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.util.concurrent.BlockingQueue"> <!-- --> </a> <h3>Methods inherited from interface java.util.concurrent.BlockingQueue</h3> <code>add, contains</code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.util.Queue"> <!-- --> </a> <h3>Methods inherited from interface java.util.Queue</h3> <code>element, remove</code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.util.Collection"> <!-- --> </a> <h3>Methods inherited from interface java.util.Collection</h3> <code>addAll, containsAll, equals, hashCode, isEmpty, removeAll, retainAll</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="VariableLinkedBlockingQueue()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>VariableLinkedBlockingQueue</h4> <pre>public VariableLinkedBlockingQueue()</pre> <div class="block">Creates a <tt>LinkedBlockingQueue</tt> with a capacity of <code>Integer.MAX_VALUE</code>.</div> </li> </ul> <a name="VariableLinkedBlockingQueue(int)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>VariableLinkedBlockingQueue</h4> <pre>public VariableLinkedBlockingQueue(int capacity)</pre> <div class="block">Creates a <tt>LinkedBlockingQueue</tt> with the given (fixed) capacity.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>capacity</code> - the capacity of this queue.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.lang.IllegalArgumentException</code> - if <tt>capacity</tt> is not greater than zero.</dd></dl> </li> </ul> <a name="VariableLinkedBlockingQueue(java.util.Collection)"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>VariableLinkedBlockingQueue</h4> <pre>public VariableLinkedBlockingQueue(java.util.Collection<? extends <a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>> c)</pre> <div class="block">Creates a <tt>LinkedBlockingQueue</tt> with a capacity of <code>Integer.MAX_VALUE</code>, initially containing the elements of the given collection, added in traversal order of the collection's iterator.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>c</code> - the collection of elements to initially contain</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.lang.NullPointerException</code> - if <tt>c</tt> or any element within it is <tt>null</tt></dd></dl> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method_detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="size()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>size</h4> <pre>public int size()</pre> <div class="block">Returns the number of elements in this queue.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>size</code> in interface <code>java.util.Collection<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> <dt><strong>Specified by:</strong></dt> <dd><code>size</code> in class <code>java.util.AbstractCollection<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> <dt><span class="strong">Returns:</span></dt><dd>the number of elements in this queue.</dd></dl> </li> </ul> <a name="setCapacity(int)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setCapacity</h4> <pre>public void setCapacity(int capacity)</pre> <div class="block">Set a new capacity for the queue. Increasing the capacity can cause any waiting <code>#put(E)</code> invocations to succeed if the new capacity is larger than the queue.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>capacity</code> - the new capacity for the queue</dd></dl> </li> </ul> <a name="remainingCapacity()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>remainingCapacity</h4> <pre>public int remainingCapacity()</pre> <div class="block">Returns the number of elements that this queue can ideally (in the absence of memory or resource constraints) accept without blocking. This is always equal to the initial capacity of this queue less the current <tt>size</tt> of this queue. <p>Note that you <em>cannot</em> always tell if an attempt to <tt>add</tt> an element will succeed by inspecting <tt>remainingCapacity</tt> because it may be the case that a waiting consumer is ready to <tt>take</tt> an element out of an otherwise full queue.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>remainingCapacity</code> in interface <code>java.util.concurrent.BlockingQueue<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> </dl> </li> </ul> <a name="put(java.lang.Object)"> <!-- --> </a><a name="put(E)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>put</h4> <pre>public void put(<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a> o) throws java.lang.InterruptedException</pre> <div class="block">Adds the specified element to the tail of this queue, waiting if necessary for space to become available.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>put</code> in interface <code>java.util.concurrent.BlockingQueue<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> <dt><span class="strong">Parameters:</span></dt><dd><code>o</code> - the element to add</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.lang.InterruptedException</code> - if interrupted while waiting.</dd> <dd><code>java.lang.NullPointerException</code> - if the specified element is <tt>null</tt>.</dd></dl> </li> </ul> <a name="offer(java.lang.Object,long,java.util.concurrent.TimeUnit)"> <!-- --> </a><a name="offer(E, long, java.util.concurrent.TimeUnit)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>offer</h4> <pre>public boolean offer(<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a> o, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException</pre> <div class="block">Inserts the specified element at the tail of this queue, waiting if necessary up to the specified wait time for space to become available.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>offer</code> in interface <code>java.util.concurrent.BlockingQueue<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> <dt><span class="strong">Parameters:</span></dt><dd><code>o</code> - the element to add</dd><dd><code>timeout</code> - how long to wait before giving up, in units of <tt>unit</tt></dd><dd><code>unit</code> - a <tt>TimeUnit</tt> determining how to interpret the <tt>timeout</tt> parameter</dd> <dt><span class="strong">Returns:</span></dt><dd><tt>true</tt> if successful, or <tt>false</tt> if the specified waiting time elapses before space is available.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.lang.InterruptedException</code> - if interrupted while waiting.</dd> <dd><code>java.lang.NullPointerException</code> - if the specified element is <tt>null</tt>.</dd></dl> </li> </ul> <a name="offer(java.lang.Object)"> <!-- --> </a><a name="offer(E)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>offer</h4> <pre>public boolean offer(<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a> o)</pre> <div class="block">Inserts the specified element at the tail of this queue if possible, returning immediately if this queue is full.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>offer</code> in interface <code>java.util.concurrent.BlockingQueue<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> <dt><strong>Specified by:</strong></dt> <dd><code>offer</code> in interface <code>java.util.Queue<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> <dt><span class="strong">Parameters:</span></dt><dd><code>o</code> - the element to add.</dd> <dt><span class="strong">Returns:</span></dt><dd><tt>true</tt> if it was possible to add the element to this queue, else <tt>false</tt></dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.lang.NullPointerException</code> - if the specified element is <tt>null</tt></dd></dl> </li> </ul> <a name="take()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>take</h4> <pre>public <a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a> take() throws java.lang.InterruptedException</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>take</code> in interface <code>java.util.concurrent.BlockingQueue<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.lang.InterruptedException</code></dd></dl> </li> </ul> <a name="poll(long, java.util.concurrent.TimeUnit)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>poll</h4> <pre>public <a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a> poll(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>poll</code> in interface <code>java.util.concurrent.BlockingQueue<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.lang.InterruptedException</code></dd></dl> </li> </ul> <a name="poll()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>poll</h4> <pre>public <a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a> poll()</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>poll</code> in interface <code>java.util.Queue<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> </dl> </li> </ul> <a name="peek()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>peek</h4> <pre>public <a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a> peek()</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>peek</code> in interface <code>java.util.Queue<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> </dl> </li> </ul> <a name="remove(java.lang.Object)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>remove</h4> <pre>public boolean remove(java.lang.Object o)</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>remove</code> in interface <code>java.util.Collection<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> <dt><strong>Specified by:</strong></dt> <dd><code>remove</code> in interface <code>java.util.concurrent.BlockingQueue<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> <dt><strong>Overrides:</strong></dt> <dd><code>remove</code> in class <code>java.util.AbstractCollection<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> </dl> </li> </ul> <a name="toArray()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>toArray</h4> <pre>public java.lang.Object[] toArray()</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>toArray</code> in interface <code>java.util.Collection<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> <dt><strong>Overrides:</strong></dt> <dd><code>toArray</code> in class <code>java.util.AbstractCollection<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> </dl> </li> </ul> <a name="toArray(java.lang.Object[])"> <!-- --> </a><a name="toArray(T[])"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>toArray</h4> <pre>public <T> T[] toArray(T[] a)</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>toArray</code> in interface <code>java.util.Collection<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> <dt><strong>Overrides:</strong></dt> <dd><code>toArray</code> in class <code>java.util.AbstractCollection<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> </dl> </li> </ul> <a name="toString()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>toString</h4> <pre>public java.lang.String toString()</pre> <dl> <dt><strong>Overrides:</strong></dt> <dd><code>toString</code> in class <code>java.util.AbstractCollection<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> </dl> </li> </ul> <a name="clear()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>clear</h4> <pre>public void clear()</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>clear</code> in interface <code>java.util.Collection<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> <dt><strong>Overrides:</strong></dt> <dd><code>clear</code> in class <code>java.util.AbstractQueue<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> </dl> </li> </ul> <a name="drainTo(java.util.Collection)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>drainTo</h4> <pre>public int drainTo(java.util.Collection<? super <a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>> c)</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>drainTo</code> in interface <code>java.util.concurrent.BlockingQueue<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> </dl> </li> </ul> <a name="drainTo(java.util.Collection, int)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>drainTo</h4> <pre>public int drainTo(java.util.Collection<? super <a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>> c, int maxElements)</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>drainTo</code> in interface <code>java.util.concurrent.BlockingQueue<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> </dl> </li> </ul> <a name="iterator()"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>iterator</h4> <pre>public java.util.Iterator<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>> iterator()</pre> <div class="block">Returns an iterator over the elements in this queue in proper sequence. The returned <tt>Iterator</tt> 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.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>iterator</code> in interface <code>java.lang.Iterable<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> <dt><strong>Specified by:</strong></dt> <dd><code>iterator</code> in interface <code>java.util.Collection<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> <dt><strong>Specified by:</strong></dt> <dd><code>iterator</code> in class <code>java.util.AbstractCollection<<a href="../../../../com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" title="type parameter in VariableLinkedBlockingQueue">E</a>></code></dd> <dt><span class="strong">Returns:</span></dt><dd>an iterator over the elements in this queue in proper sequence.</dd></dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../com/rabbitmq/client/impl/ValueWriter.html" title="class in com.rabbitmq.client.impl"><span class="strong">Prev Class</span></a></li> <li><a href="../../../../com/rabbitmq/client/impl/Version.html" title="class in com.rabbitmq.client.impl"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?com/rabbitmq/client/impl/VariableLinkedBlockingQueue.html" target="_top">Frames</a></li> <li><a href="VariableLinkedBlockingQueue.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li>Nested | </li> <li>Field | </li> <li><a href="#constructor_summary">Constr</a> | </li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li>Field | </li> <li><a href="#constructor_detail">Constr</a> | </li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>