1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
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">
8 BlockingBuffer (Commons Collections
3.2.1 API)
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)";
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=
"">
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> </TD>
39 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-summary.html"><FONT CLASS=
"NavBarFont1"><B>Package
</B></FONT></A> </TD>
40 <TD BGCOLOR=
"#FFFFFF" CLASS=
"NavBarCell1Rev"> <FONT CLASS=
"NavBarFont1Rev"><B>Class
</B></FONT> </TD>
41 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"class-use/BlockingBuffer.html"><FONT CLASS=
"NavBarFont1"><B>Use
</B></FONT></A> </TD>
42 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-tree.html"><FONT CLASS=
"NavBarFont1"><B>Tree
</B></FONT></A> </TD>
43 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../deprecated-list.html"><FONT CLASS=
"NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
44 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../index-all.html"><FONT CLASS=
"NavBarFont1"><B>Index
</B></FONT></A> </TD>
45 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../help-doc.html"><FONT CLASS=
"NavBarFont1"><B>Help
</B></FONT></A> </TD>
49 <TD ALIGN=
"right" VALIGN=
"top" ROWSPAN=
3><EM>
55 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
56 <A HREF=
"../../../../../org/apache/commons/collections/buffer/AbstractBufferDecorator.html" title=
"class in org.apache.commons.collections.buffer"><B>PREV CLASS
</B></A>
57 <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>
60 <A HREF=
"BlockingBuffer.html" target=
"_top"><B>NO FRAMES
</B></A>
61 <SCRIPT type=
"text/javascript">
64 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
69 <A HREF=
"../../../../../allclasses-noframe.html"><B>All Classes
</B></A>
76 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
77 SUMMARY:
NESTED
|
<A HREF=
"#fields_inherited_from_class_org.apache.commons.collections.collection.SynchronizedCollection">FIELD
</A> |
<A HREF=
"#constructor_summary">CONSTR
</A> |
<A HREF=
"#method_summary">METHOD
</A></FONT></TD>
78 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
79 DETAIL:
FIELD
|
<A HREF=
"#constructor_detail">CONSTR
</A> |
<A HREF=
"#method_detail">METHOD
</A></FONT></TD>
82 <A NAME=
"skip-navbar_top"></A>
83 <!-- ========= END OF TOP NAVBAR ========= -->
86 <!-- ======== START OF CLASS DATA ======== -->
89 org.apache.commons.collections.buffer
</FONT>
91 Class BlockingBuffer
</H2>
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>
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>
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>
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.
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>
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>
146 <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>
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>
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>
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> buffer)
</CODE>
170 Constructor that wraps (not copies).
</TD>
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> buffer,
176 long
timeoutMillis)
</CODE>
179 Constructor that wraps (not copies).
</TD>
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>
191 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
192 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
193 <CODE> 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
o)
</CODE>
197 </TD>
199 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
200 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
201 <CODE> 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
c)
</CODE>
205 </TD>
207 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
208 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
209 <CODE>static
<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> buffer)
</CODE>
213 Factory method to create a blocking buffer.
</TD>
215 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
216 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
217 <CODE>static
<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> buffer,
219 long
timeoutMillis)
</CODE>
222 Factory method to create a blocking buffer with a timeout value.
</TD>
224 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
225 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
226 <CODE> java.lang.Object
</CODE></FONT></TD>
227 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/collections/buffer/BlockingBuffer.html#get()">get
</A></B>()
</CODE>
230 Gets the next value from the buffer, waiting until an object is
231 added if the buffer is empty.
</TD>
233 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
234 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
235 <CODE> 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
timeout)
</CODE>
239 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>
242 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
243 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
244 <CODE> java.lang.Object
</CODE></FONT></TD>
245 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/collections/buffer/BlockingBuffer.html#remove()">remove
</A></B>()
</CODE>
248 Removes the next value from the buffer, waiting until an object is
249 added if the buffer is empty.
</TD>
251 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
252 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
253 <CODE> 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
timeout)
</CODE>
257 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>
261 <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>
266 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
267 <TD><CODE><A HREF=
"../../../../../org/apache/commons/collections/buffer/SynchronizedBuffer.html#getBuffer()">getBuffer
</A></CODE></TD>
270 <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>
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>
279 <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>
284 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
285 <TD><CODE>clone, finalize, getClass, notify, notifyAll, wait, wait, wait
</CODE></TD>
288 <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>
293 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
294 <TD><CODE>clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
</CODE></TD>
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>
310 <A NAME=
"BlockingBuffer(org.apache.commons.collections.Buffer)"><!-- --></A><H3>
313 protected
<B>BlockingBuffer
</B>(
<A HREF=
"../../../../../org/apache/commons/collections/Buffer.html" title=
"interface in org.apache.commons.collections">Buffer
</A> buffer)
</PRE>
315 <DD>Constructor that wraps (not copies).
318 <DT><B>Parameters:
</B><DD><CODE>buffer
</CODE> - the buffer to decorate, must not be null
320 <DD><CODE>java.lang.IllegalArgumentException
</CODE> - if the buffer is null
</DL>
324 <A NAME=
"BlockingBuffer(org.apache.commons.collections.Buffer, long)"><!-- --></A><H3>
327 protected
<B>BlockingBuffer
</B>(
<A HREF=
"../../../../../org/apache/commons/collections/Buffer.html" title=
"interface in org.apache.commons.collections">Buffer
</A> buffer,
328 long
timeoutMillis)
</PRE>
330 <DD>Constructor that wraps (not copies).
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
335 <DD><CODE>java.lang.IllegalArgumentException
</CODE> - if the buffer is null
<DT><B>Since:
</B></DT>
336 <DD>Commons Collections
3.2</DD>
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>
350 <A NAME=
"decorate(org.apache.commons.collections.Buffer)"><!-- --></A><H3>
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> buffer)
</PRE>
355 <DD>Factory method to create a blocking buffer.
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
361 <DD><CODE>java.lang.IllegalArgumentException
</CODE> - if buffer is null
</DL>
366 <A NAME=
"decorate(org.apache.commons.collections.Buffer, long)"><!-- --></A><H3>
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> buffer,
370 long
timeoutMillis)
</PRE>
372 <DD>Factory method to create a blocking buffer with a timeout value.
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
378 <DD><CODE>java.lang.IllegalArgumentException
</CODE> - if the buffer is null
<DT><B>Since:
</B></DT>
379 <DD>Commons Collections
3.2</DD>
385 <A NAME=
"add(java.lang.Object)"><!-- --></A><H3>
388 public boolean
<B>add
</B>(java.lang.Object
o)
</PRE>
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>
399 <A NAME=
"addAll(java.util.Collection)"><!-- --></A><H3>
402 public boolean
<B>addAll
</B>(java.util.Collection
c)
</PRE>
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>
413 <A NAME=
"get()"><!-- --></A><H3>
416 public java.lang.Object
<B>get
</B>()
</PRE>
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.
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>
427 <DT><B>Returns:
</B><DD>the next object in the buffer, which is not removed
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>
434 <A NAME=
"get(long)"><!-- --></A><H3>
437 public java.lang.Object
<B>get
</B>(long
timeout)
</PRE>
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.
443 <DT><B>Parameters:
</B><DD><CODE>timeout
</CODE> - the timeout value in milliseconds
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>
453 <A NAME=
"remove()"><!-- --></A><H3>
456 public java.lang.Object
<B>remove
</B>()
</PRE>
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.
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>
467 <DT><B>Returns:
</B><DD>the next object in the buffer, which is also removed
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>
474 <A NAME=
"remove(long)"><!-- --></A><H3>
477 public java.lang.Object
<B>remove
</B>(long
timeout)
</PRE>
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.
483 <DT><B>Parameters:
</B><DD><CODE>timeout
</CODE> - the timeout value in milliseconds
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>
491 <!-- ========= END OF CLASS DATA ========= -->
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=
"">
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> </TD>
505 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-summary.html"><FONT CLASS=
"NavBarFont1"><B>Package
</B></FONT></A> </TD>
506 <TD BGCOLOR=
"#FFFFFF" CLASS=
"NavBarCell1Rev"> <FONT CLASS=
"NavBarFont1Rev"><B>Class
</B></FONT> </TD>
507 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"class-use/BlockingBuffer.html"><FONT CLASS=
"NavBarFont1"><B>Use
</B></FONT></A> </TD>
508 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-tree.html"><FONT CLASS=
"NavBarFont1"><B>Tree
</B></FONT></A> </TD>
509 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../deprecated-list.html"><FONT CLASS=
"NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
510 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../index-all.html"><FONT CLASS=
"NavBarFont1"><B>Index
</B></FONT></A> </TD>
511 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../help-doc.html"><FONT CLASS=
"NavBarFont1"><B>Help
</B></FONT></A> </TD>
515 <TD ALIGN=
"right" VALIGN=
"top" ROWSPAN=
3><EM>
521 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
522 <A HREF=
"../../../../../org/apache/commons/collections/buffer/AbstractBufferDecorator.html" title=
"class in org.apache.commons.collections.buffer"><B>PREV CLASS
</B></A>
523 <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>
526 <A HREF=
"BlockingBuffer.html" target=
"_top"><B>NO FRAMES
</B></A>
527 <SCRIPT type=
"text/javascript">
530 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
535 <A HREF=
"../../../../../allclasses-noframe.html"><B>All Classes
</B></A>
542 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
543 SUMMARY:
NESTED
|
<A HREF=
"#fields_inherited_from_class_org.apache.commons.collections.collection.SynchronizedCollection">FIELD
</A> |
<A HREF=
"#constructor_summary">CONSTR
</A> |
<A HREF=
"#method_summary">METHOD
</A></FONT></TD>
544 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
545 DETAIL:
FIELD
|
<A HREF=
"#constructor_detail">CONSTR
</A> |
<A HREF=
"#method_detail">METHOD
</A></FONT></TD>
548 <A NAME=
"skip-navbar_bottom"></A>
549 <!-- ======== END OF BOTTOM NAVBAR ======= -->
552 Copyright ©
2001-
2008 <a href=
"http://www.apache.org/">The Apache Software Foundation
</a>. All Rights Reserved.