Improved build.xml
[vimdoclet.git] / sample / java.util.concurrent.LinkedBlockingQueue.txt
blob507179a0a010c37cf24b53c76f215aae759787d2
1 *java.util.concurrent.LinkedBlockingQueue* *LinkedBlockingQueue* An optionally-b
3 public class LinkedBlockingQueue
4   extends    |java.util.AbstractQueue|
5   implements |java.util.concurrent.BlockingQueue|
6              |java.io.Serializable|
8 |java.util.concurrent.LinkedBlockingQueue_Description|
9 |java.util.concurrent.LinkedBlockingQueue_Fields|
10 |java.util.concurrent.LinkedBlockingQueue_Constructors|
11 |java.util.concurrent.LinkedBlockingQueue_Methods|
13 ================================================================================
15 *java.util.concurrent.LinkedBlockingQueue_Constructors*
16 |java.util.concurrent.LinkedBlockingQueue()|Creates a LinkedBlockingQueue with 
17 |java.util.concurrent.LinkedBlockingQueue(Collection)|Creates a LinkedBlockingQ
18 |java.util.concurrent.LinkedBlockingQueue(int)|Creates a LinkedBlockingQueue wi
20 *java.util.concurrent.LinkedBlockingQueue_Methods*
21 |java.util.concurrent.LinkedBlockingQueue.clear()|Atomically removes all of the
22 |java.util.concurrent.LinkedBlockingQueue.drainTo(Collection)|
23 |java.util.concurrent.LinkedBlockingQueue.drainTo(Collection,int)|
24 |java.util.concurrent.LinkedBlockingQueue.iterator()|Returns an iterator over t
25 |java.util.concurrent.LinkedBlockingQueue.offer(E)|Inserts the specified elemen
26 |java.util.concurrent.LinkedBlockingQueue.offer(E,long,TimeUnit)|Inserts the sp
27 |java.util.concurrent.LinkedBlockingQueue.peek()|
28 |java.util.concurrent.LinkedBlockingQueue.poll()|
29 |java.util.concurrent.LinkedBlockingQueue.poll(long,TimeUnit)|
30 |java.util.concurrent.LinkedBlockingQueue.put(E)|Adds the specified element to 
31 |java.util.concurrent.LinkedBlockingQueue.remainingCapacity()|Returns the numbe
32 |java.util.concurrent.LinkedBlockingQueue.remove(Object)|Removes a single insta
33 |java.util.concurrent.LinkedBlockingQueue.size()|Returns the number of elements
34 |java.util.concurrent.LinkedBlockingQueue.take()|
35 |java.util.concurrent.LinkedBlockingQueue.toArray()|
36 |java.util.concurrent.LinkedBlockingQueue.toArray(T[])|
37 |java.util.concurrent.LinkedBlockingQueue.toString()|
39 *java.util.concurrent.LinkedBlockingQueue_Description*
41 An optionally-bounded blocking queue(|java.util.concurrent.BlockingQueue|) 
42 based on linked nodes. This queue orders elements FIFO (first-in-first-out). 
43 The head of the queue is that element that has been on the queue the longest 
44 time. The tail of the queue is that element that has been on the queue the 
45 shortest time. New elements are inserted at the tail of the queue, and the 
46 queue retrieval operations obtain elements at the head of the queue. Linked 
47 queues typically have higher throughput than array-based queues but less 
48 predictable performance in most concurrent applications. 
50 The optional capacity bound constructor argument serves as a way to prevent 
51 excessive queue expansion. The capacity, if unspecified, is equal to 
52 (|java.lang.Integer|) . Linked nodes are dynamically created upon each 
53 insertion unless this would bring the queue above capacity. 
55 This class and its iterator implement all of the optional methods of the 
56 (|java.util.Collection|) and (|java.util.Iterator|) interfaces. 
58 This class is a member of the <a href="/../guide/collections/index.html"> Java 
59 Collections Framework. 
62 *java.util.concurrent.LinkedBlockingQueue()*
64 public LinkedBlockingQueue()
66 Creates a LinkedBlockingQueue with a capacity of (|java.lang.Integer|) . 
69 *java.util.concurrent.LinkedBlockingQueue(Collection)*
71 public LinkedBlockingQueue(java.util.Collection c)
73 Creates a LinkedBlockingQueue with a capacity of (|java.lang.Integer|) , 
74 initially containing the elements of the given collection, added in traversal 
75 order of the collection's iterator. 
77     c - the collection of elements to initially contain 
79 *java.util.concurrent.LinkedBlockingQueue(int)*
81 public LinkedBlockingQueue(int capacity)
83 Creates a LinkedBlockingQueue with the given (fixed) capacity. 
85     capacity - the capacity of this queue. 
87 *java.util.concurrent.LinkedBlockingQueue.clear()*
89 public void clear()
91 Atomically removes all of the elements from this queue. The queue will be empty 
92 after this call returns. 
95 *java.util.concurrent.LinkedBlockingQueue.drainTo(Collection)*
97 public int drainTo(java.util.Collection c)
102 *java.util.concurrent.LinkedBlockingQueue.drainTo(Collection,int)*
104 public int drainTo(
105   java.util.Collection c,
106   int maxElements)
111 *java.util.concurrent.LinkedBlockingQueue.iterator()*
113 public |java.util.Iterator| iterator()
115 Returns an iterator over the elements in this queue in proper sequence. The 
116 returned Iterator is a "weakly consistent" iterator that will never throw 
117 (|java.util.ConcurrentModificationException|) , and guarantees to traverse 
118 elements as they existed upon construction of the iterator, and may (but is not 
119 guaranteed to) reflect any modifications subsequent to construction. 
122     Returns: an iterator over the elements in this queue in proper sequence. 
123 *java.util.concurrent.LinkedBlockingQueue.offer(E)*
125 public boolean offer(java.lang.Object o)
127 Inserts the specified element at the tail of this queue if possible, returning 
128 immediately if this queue is full. 
130     o - the element to add. 
132     Returns: true if it was possible to add the element to this queue, else false 
133 *java.util.concurrent.LinkedBlockingQueue.offer(E,long,TimeUnit)*
135 public boolean offer(
136   java.lang.Object o,
137   long timeout,
138   java.util.concurrent.TimeUnit unit)
139   throws |java.lang.InterruptedException|
140          
141 Inserts the specified element at the tail of this queue, waiting if necessary 
142 up to the specified wait time for space to become available. 
144     o - the element to add 
145     timeout - how long to wait before giving up, in units of unit 
146     unit - a TimeUnit determining how to interpret the timeout parameter 
148     Returns: true if successful, or false if the specified waiting time elapses before space 
149              is available. 
150 *java.util.concurrent.LinkedBlockingQueue.peek()*
152 public |java.lang.Object| peek()
157 *java.util.concurrent.LinkedBlockingQueue.poll()*
159 public |java.lang.Object| poll()
164 *java.util.concurrent.LinkedBlockingQueue.poll(long,TimeUnit)*
166 public |java.lang.Object| poll(
167   long timeout,
168   java.util.concurrent.TimeUnit unit)
169   throws |java.lang.InterruptedException|
170          
174 *java.util.concurrent.LinkedBlockingQueue.put(E)*
176 public void put(java.lang.Object o)
177   throws |java.lang.InterruptedException|
178          
179 Adds the specified element to the tail of this queue, waiting if necessary for 
180 space to become available. 
182     o - the element to add 
184 *java.util.concurrent.LinkedBlockingQueue.remainingCapacity()*
186 public int remainingCapacity()
188 Returns the number of elements that this queue can ideally (in the absence of 
189 memory or resource constraints) accept without blocking. This is always equal 
190 to the initial capacity of this queue less the current size of this queue. Note 
191 that you cannot always tell if an attempt to add an element will succeed by 
192 inspecting remainingCapacity because it may be the case that a waiting consumer 
193 is ready to take an element out of an otherwise full queue. 
196 *java.util.concurrent.LinkedBlockingQueue.remove(Object)*
198 public boolean remove(java.lang.Object o)
200 Removes a single instance of the specified element from this queue, if it is 
201 present. 
204 *java.util.concurrent.LinkedBlockingQueue.size()*
206 public int size()
208 Returns the number of elements in this queue. 
211     Returns: the number of elements in this queue. 
212 *java.util.concurrent.LinkedBlockingQueue.take()*
214 public |java.lang.Object| take()
215   throws |java.lang.InterruptedException|
216          
220 *java.util.concurrent.LinkedBlockingQueue.toArray()*
222 public |java.lang.Object| toArray()
227 *java.util.concurrent.LinkedBlockingQueue.toArray(T[])*
229 public |java.lang.Object| toArray(java.lang.Object[] a)
234 *java.util.concurrent.LinkedBlockingQueue.toString()*
236 public |java.lang.String| toString()