a whole bunch of stuff
[ephemerata.git] / KezvhLib / lib / org.apache.commons.collections / apidocs / org / apache / commons / collections / buffer / BlockingBuffer.html
blob4e7c4659bd9f78faeda9fbc3a06ac8a24ffb3ac6
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <!--NewPage-->
3 <HTML>
4 <HEAD>
5 <!-- Generated by javadoc (build 1.5.0_07) on Fri Apr 11 15:39:18 BST 2008 -->
6 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
7 <TITLE>
8 BlockingBuffer (Commons Collections 3.2.1 API)
9 </TITLE>
11 <META NAME="keywords" CONTENT="org.apache.commons.collections.buffer.BlockingBuffer class">
13 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
15 <SCRIPT type="text/javascript">
16 function windowTitle()
18 parent.document.title="BlockingBuffer (Commons Collections 3.2.1 API)";
20 </SCRIPT>
21 <NOSCRIPT>
22 </NOSCRIPT>
24 </HEAD>
26 <BODY BGCOLOR="white" onload="windowTitle();">
29 <!-- ========= START OF TOP NAVBAR ======= -->
30 <A NAME="navbar_top"><!-- --></A>
31 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
32 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
33 <TR>
34 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
35 <A NAME="navbar_top_firstrow"><!-- --></A>
36 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
37 <TR ALIGN="center" VALIGN="top">
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
40 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BlockingBuffer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
46 </TR>
47 </TABLE>
48 </TD>
49 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
50 </EM>
51 </TD>
52 </TR>
54 <TR>
55 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
56 &nbsp;<A HREF="../../../../../org/apache/commons/collections/buffer/AbstractBufferDecorator.html" title="class in org.apache.commons.collections.buffer"><B>PREV CLASS</B></A>&nbsp;
57 &nbsp;<A HREF="../../../../../org/apache/commons/collections/buffer/BoundedBuffer.html" title="class in org.apache.commons.collections.buffer"><B>NEXT CLASS</B></A></FONT></TD>
58 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
59 <A HREF="../../../../../index.html?org/apache/commons/collections/buffer/BlockingBuffer.html" target="_top"><B>FRAMES</B></A> &nbsp;
60 &nbsp;<A HREF="BlockingBuffer.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
61 &nbsp;<SCRIPT type="text/javascript">
62 <!--
63 if(window==top) {
64 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
66 //-->
67 </SCRIPT>
68 <NOSCRIPT>
69 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
70 </NOSCRIPT>
73 </FONT></TD>
74 </TR>
75 <TR>
76 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.apache.commons.collections.collection.SynchronizedCollection">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
80 </TR>
81 </TABLE>
82 <A NAME="skip-navbar_top"></A>
83 <!-- ========= END OF TOP NAVBAR ========= -->
85 <HR>
86 <!-- ======== START OF CLASS DATA ======== -->
87 <H2>
88 <FONT SIZE="-1">
89 org.apache.commons.collections.buffer</FONT>
90 <BR>
91 Class BlockingBuffer</H2>
92 <PRE>
93 java.lang.Object
94 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html" title="class in org.apache.commons.collections.collection">org.apache.commons.collections.collection.SynchronizedCollection</A>
95 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/commons/collections/buffer/SynchronizedBuffer.html" title="class in org.apache.commons.collections.buffer">org.apache.commons.collections.buffer.SynchronizedBuffer</A>
96 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.collections.buffer.BlockingBuffer</B>
97 </PRE>
98 <DL>
99 <DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, java.lang.Iterable, java.util.Collection, <A HREF="../../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A></DD>
100 </DL>
101 <HR>
102 <DL>
103 <DT><PRE>public class <B>BlockingBuffer</B><DT>extends <A HREF="../../../../../org/apache/commons/collections/buffer/SynchronizedBuffer.html" title="class in org.apache.commons.collections.buffer">SynchronizedBuffer</A></DL>
104 </PRE>
107 Decorates another <code>Buffer</code> to make <A HREF="../../../../../org/apache/commons/collections/buffer/BlockingBuffer.html#get()"><CODE>get()</CODE></A> and
108 <A HREF="../../../../../org/apache/commons/collections/buffer/BlockingBuffer.html#remove()"><CODE>remove()</CODE></A> block when the <code>Buffer</code> is empty.
110 If either <code>get</code> or <code>remove</code> is called on an empty
111 <code>Buffer</code>, the calling thread waits for notification that
112 an <code>add</code> or <code>addAll</code> operation has completed.
114 When one or more entries are added to an empty <code>Buffer</code>,
115 all threads blocked in <code>get</code> or <code>remove</code> are notified.
116 There is no guarantee that concurrent blocked <code>get</code> or
117 <code>remove</code> requests will be "unblocked" and receive data in the
118 order that they arrive.
120 This class is Serializable from Commons Collections 3.1.
121 This class contains an extra field in 3.2, however the serialization
122 specification will handle this gracefully.
126 <DL>
127 <DT><B>Since:</B></DT>
128 <DD>Commons Collections 3.0</DD>
129 <DT><B>Version:</B></DT>
130 <DD>$Revision: 646777 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $</DD>
131 <DT><B>Author:</B></DT>
132 <DD>Stephen Colebourne, Janek Bogucki, Phil Steitz, James Carman</DD>
133 <DT><B>See Also:</B><DD><A HREF="../../../../../serialized-form.html#org.apache.commons.collections.buffer.BlockingBuffer">Serialized Form</A></DL>
134 <HR>
137 <!-- =========== FIELD SUMMARY =========== -->
139 <A NAME="field_summary"><!-- --></A>
140 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
141 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
142 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
143 <B>Field Summary</B></FONT></TH>
144 </TR>
145 </TABLE>
146 &nbsp;<A NAME="fields_inherited_from_class_org.apache.commons.collections.collection.SynchronizedCollection"><!-- --></A>
147 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
148 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
149 <TH ALIGN="left"><B>Fields inherited from class org.apache.commons.collections.collection.<A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html" title="class in org.apache.commons.collections.collection">SynchronizedCollection</A></B></TH>
150 </TR>
151 <TR BGCOLOR="white" CLASS="TableRowColor">
152 <TD><CODE><A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#collection">collection</A>, <A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#lock">lock</A></CODE></TD>
153 </TR>
154 </TABLE>
155 &nbsp;
156 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
158 <A NAME="constructor_summary"><!-- --></A>
159 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
160 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
161 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
162 <B>Constructor Summary</B></FONT></TH>
163 </TR>
164 <TR BGCOLOR="white" CLASS="TableRowColor">
165 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
166 <CODE>protected </CODE></FONT></TD>
167 <TD><CODE><B><A HREF="../../../../../org/apache/commons/collections/buffer/BlockingBuffer.html#BlockingBuffer(org.apache.commons.collections.Buffer)">BlockingBuffer</A></B>(<A HREF="../../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A>&nbsp;buffer)</CODE>
169 <BR>
170 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor that wraps (not copies).</TD>
171 </TR>
172 <TR BGCOLOR="white" CLASS="TableRowColor">
173 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
174 <CODE>protected </CODE></FONT></TD>
175 <TD><CODE><B><A HREF="../../../../../org/apache/commons/collections/buffer/BlockingBuffer.html#BlockingBuffer(org.apache.commons.collections.Buffer, long)">BlockingBuffer</A></B>(<A HREF="../../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A>&nbsp;buffer,
176 long&nbsp;timeoutMillis)</CODE>
178 <BR>
179 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor that wraps (not copies).</TD>
180 </TR>
181 </TABLE>
182 &nbsp;
183 <!-- ========== METHOD SUMMARY =========== -->
185 <A NAME="method_summary"><!-- --></A>
186 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
187 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
188 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
189 <B>Method Summary</B></FONT></TH>
190 </TR>
191 <TR BGCOLOR="white" CLASS="TableRowColor">
192 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
193 <CODE>&nbsp;boolean</CODE></FONT></TD>
194 <TD><CODE><B><A HREF="../../../../../org/apache/commons/collections/buffer/BlockingBuffer.html#add(java.lang.Object)">add</A></B>(java.lang.Object&nbsp;o)</CODE>
196 <BR>
197 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
198 </TR>
199 <TR BGCOLOR="white" CLASS="TableRowColor">
200 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
201 <CODE>&nbsp;boolean</CODE></FONT></TD>
202 <TD><CODE><B><A HREF="../../../../../org/apache/commons/collections/buffer/BlockingBuffer.html#addAll(java.util.Collection)">addAll</A></B>(java.util.Collection&nbsp;c)</CODE>
204 <BR>
205 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
206 </TR>
207 <TR BGCOLOR="white" CLASS="TableRowColor">
208 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
209 <CODE>static&nbsp;<A HREF="../../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A></CODE></FONT></TD>
210 <TD><CODE><B><A HREF="../../../../../org/apache/commons/collections/buffer/BlockingBuffer.html#decorate(org.apache.commons.collections.Buffer)">decorate</A></B>(<A HREF="../../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A>&nbsp;buffer)</CODE>
212 <BR>
213 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Factory method to create a blocking buffer.</TD>
214 </TR>
215 <TR BGCOLOR="white" CLASS="TableRowColor">
216 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
217 <CODE>static&nbsp;<A HREF="../../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A></CODE></FONT></TD>
218 <TD><CODE><B><A HREF="../../../../../org/apache/commons/collections/buffer/BlockingBuffer.html#decorate(org.apache.commons.collections.Buffer, long)">decorate</A></B>(<A HREF="../../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A>&nbsp;buffer,
219 long&nbsp;timeoutMillis)</CODE>
221 <BR>
222 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Factory method to create a blocking buffer with a timeout value.</TD>
223 </TR>
224 <TR BGCOLOR="white" CLASS="TableRowColor">
225 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
226 <CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
227 <TD><CODE><B><A HREF="../../../../../org/apache/commons/collections/buffer/BlockingBuffer.html#get()">get</A></B>()</CODE>
229 <BR>
230 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the next value from the buffer, waiting until an object is
231 added if the buffer is empty.</TD>
232 </TR>
233 <TR BGCOLOR="white" CLASS="TableRowColor">
234 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
235 <CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
236 <TD><CODE><B><A HREF="../../../../../org/apache/commons/collections/buffer/BlockingBuffer.html#get(long)">get</A></B>(long&nbsp;timeout)</CODE>
238 <BR>
239 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the next value from the buffer, waiting until an object is
240 added for up to the specified timeout value if the buffer is empty.</TD>
241 </TR>
242 <TR BGCOLOR="white" CLASS="TableRowColor">
243 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
244 <CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
245 <TD><CODE><B><A HREF="../../../../../org/apache/commons/collections/buffer/BlockingBuffer.html#remove()">remove</A></B>()</CODE>
247 <BR>
248 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the next value from the buffer, waiting until an object is
249 added if the buffer is empty.</TD>
250 </TR>
251 <TR BGCOLOR="white" CLASS="TableRowColor">
252 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
253 <CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
254 <TD><CODE><B><A HREF="../../../../../org/apache/commons/collections/buffer/BlockingBuffer.html#remove(long)">remove</A></B>(long&nbsp;timeout)</CODE>
256 <BR>
257 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the next value from the buffer, waiting until an object is
258 added for up to the specified timeout value if the buffer is empty.</TD>
259 </TR>
260 </TABLE>
261 &nbsp;<A NAME="methods_inherited_from_class_org.apache.commons.collections.buffer.SynchronizedBuffer"><!-- --></A>
262 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
263 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
264 <TH ALIGN="left"><B>Methods inherited from class org.apache.commons.collections.buffer.<A HREF="../../../../../org/apache/commons/collections/buffer/SynchronizedBuffer.html" title="class in org.apache.commons.collections.buffer">SynchronizedBuffer</A></B></TH>
265 </TR>
266 <TR BGCOLOR="white" CLASS="TableRowColor">
267 <TD><CODE><A HREF="../../../../../org/apache/commons/collections/buffer/SynchronizedBuffer.html#getBuffer()">getBuffer</A></CODE></TD>
268 </TR>
269 </TABLE>
270 &nbsp;<A NAME="methods_inherited_from_class_org.apache.commons.collections.collection.SynchronizedCollection"><!-- --></A>
271 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
272 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
273 <TH ALIGN="left"><B>Methods inherited from class org.apache.commons.collections.collection.<A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html" title="class in org.apache.commons.collections.collection">SynchronizedCollection</A></B></TH>
274 </TR>
275 <TR BGCOLOR="white" CLASS="TableRowColor">
276 <TD><CODE><A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#clear()">clear</A>, <A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#contains(java.lang.Object)">contains</A>, <A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#containsAll(java.util.Collection)">containsAll</A>, <A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#decorate(java.util.Collection)">decorate</A>, <A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#hashCode()">hashCode</A>, <A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#isEmpty()">isEmpty</A>, <A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#iterator()">iterator</A>, <A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#remove(java.lang.Object)">remove</A>, <A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#removeAll(java.util.Collection)">removeAll</A>, <A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#retainAll(java.util.Collection)">retainAll</A>, <A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#size()">size</A>, <A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#toArray()">toArray</A>, <A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#toArray(java.lang.Object[])">toArray</A>, <A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#toString()">toString</A></CODE></TD>
277 </TR>
278 </TABLE>
279 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
280 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
281 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
282 <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
283 </TR>
284 <TR BGCOLOR="white" CLASS="TableRowColor">
285 <TD><CODE>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</CODE></TD>
286 </TR>
287 </TABLE>
288 &nbsp;<A NAME="methods_inherited_from_class_java.util.Collection"><!-- --></A>
289 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
290 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
291 <TH ALIGN="left"><B>Methods inherited from interface java.util.Collection</B></TH>
292 </TR>
293 <TR BGCOLOR="white" CLASS="TableRowColor">
294 <TD><CODE>clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray</CODE></TD>
295 </TR>
296 </TABLE>
297 &nbsp;
300 <!-- ========= CONSTRUCTOR DETAIL ======== -->
302 <A NAME="constructor_detail"><!-- --></A>
303 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
304 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
305 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
306 <B>Constructor Detail</B></FONT></TH>
307 </TR>
308 </TABLE>
310 <A NAME="BlockingBuffer(org.apache.commons.collections.Buffer)"><!-- --></A><H3>
311 BlockingBuffer</H3>
312 <PRE>
313 protected <B>BlockingBuffer</B>(<A HREF="../../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A>&nbsp;buffer)</PRE>
314 <DL>
315 <DD>Constructor that wraps (not copies).
317 <DL>
318 <DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the buffer to decorate, must not be null
319 <DT><B>Throws:</B>
320 <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the buffer is null</DL>
321 </DL>
322 <HR>
324 <A NAME="BlockingBuffer(org.apache.commons.collections.Buffer, long)"><!-- --></A><H3>
325 BlockingBuffer</H3>
326 <PRE>
327 protected <B>BlockingBuffer</B>(<A HREF="../../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A>&nbsp;buffer,
328 long&nbsp;timeoutMillis)</PRE>
329 <DL>
330 <DD>Constructor that wraps (not copies).
332 <DL>
333 <DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the buffer to decorate, must not be null<DD><CODE>timeoutMillis</CODE> - the timeout value in milliseconds, zero or less for no timeout
334 <DT><B>Throws:</B>
335 <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the buffer is null<DT><B>Since:</B></DT>
336 <DD>Commons Collections 3.2</DD>
337 </DL>
338 </DL>
340 <!-- ============ METHOD DETAIL ========== -->
342 <A NAME="method_detail"><!-- --></A>
343 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
344 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
345 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
346 <B>Method Detail</B></FONT></TH>
347 </TR>
348 </TABLE>
350 <A NAME="decorate(org.apache.commons.collections.Buffer)"><!-- --></A><H3>
351 decorate</H3>
352 <PRE>
353 public static <A HREF="../../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A> <B>decorate</B>(<A HREF="../../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A>&nbsp;buffer)</PRE>
354 <DL>
355 <DD>Factory method to create a blocking buffer.
357 <DD><DL>
358 <DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the buffer to decorate, must not be null
359 <DT><B>Returns:</B><DD>a new blocking Buffer
360 <DT><B>Throws:</B>
361 <DD><CODE>java.lang.IllegalArgumentException</CODE> - if buffer is null</DL>
362 </DD>
363 </DL>
364 <HR>
366 <A NAME="decorate(org.apache.commons.collections.Buffer, long)"><!-- --></A><H3>
367 decorate</H3>
368 <PRE>
369 public static <A HREF="../../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A> <B>decorate</B>(<A HREF="../../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A>&nbsp;buffer,
370 long&nbsp;timeoutMillis)</PRE>
371 <DL>
372 <DD>Factory method to create a blocking buffer with a timeout value.
374 <DD><DL>
375 <DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the buffer to decorate, must not be null<DD><CODE>timeoutMillis</CODE> - the timeout value in milliseconds, zero or less for no timeout
376 <DT><B>Returns:</B><DD>a new blocking buffer
377 <DT><B>Throws:</B>
378 <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the buffer is null<DT><B>Since:</B></DT>
379 <DD>Commons Collections 3.2</DD>
380 </DL>
381 </DD>
382 </DL>
383 <HR>
385 <A NAME="add(java.lang.Object)"><!-- --></A><H3>
386 add</H3>
387 <PRE>
388 public boolean <B>add</B>(java.lang.Object&nbsp;o)</PRE>
389 <DL>
390 <DD><DL>
391 <DT><B>Specified by:</B><DD><CODE>add</CODE> in interface <CODE>java.util.Collection</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#add(java.lang.Object)">add</A></CODE> in class <CODE><A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html" title="class in org.apache.commons.collections.collection">SynchronizedCollection</A></CODE></DL>
392 </DD>
393 <DD><DL>
394 </DL>
395 </DD>
396 </DL>
397 <HR>
399 <A NAME="addAll(java.util.Collection)"><!-- --></A><H3>
400 addAll</H3>
401 <PRE>
402 public boolean <B>addAll</B>(java.util.Collection&nbsp;c)</PRE>
403 <DL>
404 <DD><DL>
405 <DT><B>Specified by:</B><DD><CODE>addAll</CODE> in interface <CODE>java.util.Collection</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html#addAll(java.util.Collection)">addAll</A></CODE> in class <CODE><A HREF="../../../../../org/apache/commons/collections/collection/SynchronizedCollection.html" title="class in org.apache.commons.collections.collection">SynchronizedCollection</A></CODE></DL>
406 </DD>
407 <DD><DL>
408 </DL>
409 </DD>
410 </DL>
411 <HR>
413 <A NAME="get()"><!-- --></A><H3>
414 get</H3>
415 <PRE>
416 public java.lang.Object <B>get</B>()</PRE>
417 <DL>
418 <DD>Gets the next value from the buffer, waiting until an object is
419 added if the buffer is empty. This method uses the default timeout
420 set in the constructor.
422 <DD><DL>
423 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/collections/Buffer.html#get()">get</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/commons/collections/buffer/SynchronizedBuffer.html#get()">get</A></CODE> in class <CODE><A HREF="../../../../../org/apache/commons/collections/buffer/SynchronizedBuffer.html" title="class in org.apache.commons.collections.buffer">SynchronizedBuffer</A></CODE></DL>
424 </DD>
425 <DD><DL>
427 <DT><B>Returns:</B><DD>the next object in the buffer, which is not removed
428 <DT><B>Throws:</B>
429 <DD><CODE><A HREF="../../../../../org/apache/commons/collections/BufferUnderflowException.html" title="class in org.apache.commons.collections">BufferUnderflowException</A></CODE> - if an interrupt is received</DL>
430 </DD>
431 </DL>
432 <HR>
434 <A NAME="get(long)"><!-- --></A><H3>
435 get</H3>
436 <PRE>
437 public java.lang.Object <B>get</B>(long&nbsp;timeout)</PRE>
438 <DL>
439 <DD>Gets the next value from the buffer, waiting until an object is
440 added for up to the specified timeout value if the buffer is empty.
442 <DD><DL>
443 <DT><B>Parameters:</B><DD><CODE>timeout</CODE> - the timeout value in milliseconds
444 <DT><B>Throws:</B>
445 <DD><CODE><A HREF="../../../../../org/apache/commons/collections/BufferUnderflowException.html" title="class in org.apache.commons.collections">BufferUnderflowException</A></CODE> - if an interrupt is received
446 <DD><CODE><A HREF="../../../../../org/apache/commons/collections/BufferUnderflowException.html" title="class in org.apache.commons.collections">BufferUnderflowException</A></CODE> - if the timeout expires<DT><B>Since:</B></DT>
447 <DD>Commons Collections 3.2</DD>
448 </DL>
449 </DD>
450 </DL>
451 <HR>
453 <A NAME="remove()"><!-- --></A><H3>
454 remove</H3>
455 <PRE>
456 public java.lang.Object <B>remove</B>()</PRE>
457 <DL>
458 <DD>Removes the next value from the buffer, waiting until an object is
459 added if the buffer is empty. This method uses the default timeout
460 set in the constructor.
462 <DD><DL>
463 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/collections/Buffer.html#remove()">remove</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/commons/collections/buffer/SynchronizedBuffer.html#remove()">remove</A></CODE> in class <CODE><A HREF="../../../../../org/apache/commons/collections/buffer/SynchronizedBuffer.html" title="class in org.apache.commons.collections.buffer">SynchronizedBuffer</A></CODE></DL>
464 </DD>
465 <DD><DL>
467 <DT><B>Returns:</B><DD>the next object in the buffer, which is also removed
468 <DT><B>Throws:</B>
469 <DD><CODE><A HREF="../../../../../org/apache/commons/collections/BufferUnderflowException.html" title="class in org.apache.commons.collections">BufferUnderflowException</A></CODE> - if an interrupt is received</DL>
470 </DD>
471 </DL>
472 <HR>
474 <A NAME="remove(long)"><!-- --></A><H3>
475 remove</H3>
476 <PRE>
477 public java.lang.Object <B>remove</B>(long&nbsp;timeout)</PRE>
478 <DL>
479 <DD>Removes the next value from the buffer, waiting until an object is
480 added for up to the specified timeout value if the buffer is empty.
482 <DD><DL>
483 <DT><B>Parameters:</B><DD><CODE>timeout</CODE> - the timeout value in milliseconds
484 <DT><B>Throws:</B>
485 <DD><CODE><A HREF="../../../../../org/apache/commons/collections/BufferUnderflowException.html" title="class in org.apache.commons.collections">BufferUnderflowException</A></CODE> - if an interrupt is received
486 <DD><CODE><A HREF="../../../../../org/apache/commons/collections/BufferUnderflowException.html" title="class in org.apache.commons.collections">BufferUnderflowException</A></CODE> - if the timeout expires<DT><B>Since:</B></DT>
487 <DD>Commons Collections 3.2</DD>
488 </DL>
489 </DD>
490 </DL>
491 <!-- ========= END OF CLASS DATA ========= -->
492 <HR>
495 <!-- ======= START OF BOTTOM NAVBAR ====== -->
496 <A NAME="navbar_bottom"><!-- --></A>
497 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
498 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
499 <TR>
500 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
501 <A NAME="navbar_bottom_firstrow"><!-- --></A>
502 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
503 <TR ALIGN="center" VALIGN="top">
504 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
505 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
506 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
507 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BlockingBuffer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
508 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
509 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
510 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
511 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
512 </TR>
513 </TABLE>
514 </TD>
515 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
516 </EM>
517 </TD>
518 </TR>
520 <TR>
521 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
522 &nbsp;<A HREF="../../../../../org/apache/commons/collections/buffer/AbstractBufferDecorator.html" title="class in org.apache.commons.collections.buffer"><B>PREV CLASS</B></A>&nbsp;
523 &nbsp;<A HREF="../../../../../org/apache/commons/collections/buffer/BoundedBuffer.html" title="class in org.apache.commons.collections.buffer"><B>NEXT CLASS</B></A></FONT></TD>
524 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
525 <A HREF="../../../../../index.html?org/apache/commons/collections/buffer/BlockingBuffer.html" target="_top"><B>FRAMES</B></A> &nbsp;
526 &nbsp;<A HREF="BlockingBuffer.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
527 &nbsp;<SCRIPT type="text/javascript">
528 <!--
529 if(window==top) {
530 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
532 //-->
533 </SCRIPT>
534 <NOSCRIPT>
535 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
536 </NOSCRIPT>
539 </FONT></TD>
540 </TR>
541 <TR>
542 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
543 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.apache.commons.collections.collection.SynchronizedCollection">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
544 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
545 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
546 </TR>
547 </TABLE>
548 <A NAME="skip-navbar_bottom"></A>
549 <!-- ======== END OF BOTTOM NAVBAR ======= -->
551 <HR>
552 Copyright © 2001-2008 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
553 </BODY>
554 </HTML>