📄 boundedlinkedqueue.html
字号:
<PRE>
public void <B>setCapacity</B>(int newCapacity)</PRE>
<DL>
<DD>Reset the capacity of this queue. If the new capacity is less than the old capacity, existing elements are NOT removed, but incoming puts will not proceed until the number of elements is less than the new capacity.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if capacity less or equal to zero</DL>
</DD>
</DL>
<HR>
<A NAME="extract()"><!-- --></A><H3>
extract</H3>
<PRE>
protected java.lang.Object <B>extract</B>()</PRE>
<DL>
<DD>Main mechanics for take/poll
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="peek()"><!-- --></A><H3>
peek</H3>
<PRE>
public java.lang.Object <B>peek</B>()</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/dbunit/util/concurrent/Channel.html" title="interface in org.dbunit.util.concurrent">Channel</A></CODE></B></DD>
<DD>Return, but do not remove object at head of Channel, or null if it is empty.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/dbunit/util/concurrent/Channel.html#peek()">peek</A></CODE> in interface <CODE><A HREF="../../../../org/dbunit/util/concurrent/Channel.html" title="interface in org.dbunit.util.concurrent">Channel</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="take()"><!-- --></A><H3>
take</H3>
<PRE>
public java.lang.Object <B>take</B>() throws java.lang.InterruptedException</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/dbunit/util/concurrent/Channel.html" title="interface in org.dbunit.util.concurrent">Channel</A></CODE></B></DD>
<DD>Return and remove an item from channel, possibly waiting indefinitely until such an item exists.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/dbunit/util/concurrent/Channel.html#take()">take</A></CODE> in interface <CODE><A HREF="../../../../org/dbunit/util/concurrent/Channel.html" title="interface in org.dbunit.util.concurrent">Channel</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>some item from the channel. Different implementations may guarantee various properties (such as FIFO) about that item<DT><B>Throws:</B><DD><CODE>java.lang.InterruptedException</CODE> - if the current thread has been interrupted at a point at which interruption is detected, in which case state of the channel is unchanged.</DL>
</DD>
</DL>
<HR>
<A NAME="poll(long)"><!-- --></A><H3>
poll</H3>
<PRE>
public java.lang.Object <B>poll</B>(long msecs) throws java.lang.InterruptedException</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/dbunit/util/concurrent/Channel.html" title="interface in org.dbunit.util.concurrent">Channel</A></CODE></B></DD>
<DD>Return and remove an item from channel only if one is available within msecs milliseconds. The time bound is interpreted in a coarse grained, best-effort fashion.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/dbunit/util/concurrent/Channel.html#poll(long)">poll</A></CODE> in interface <CODE><A HREF="../../../../org/dbunit/util/concurrent/Channel.html" title="interface in org.dbunit.util.concurrent">Channel</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>msecs</CODE> - the number of milliseconds to wait. If less than or equal to zero, the operation does not perform any timed waits, but might still require access to a synchronization lock, which can impose unbounded delay if there is a lot of contention for the channel.<DT><B>Returns:</B><DD>some item, or null if the channel is empty.<DT><B>Throws:</B><DD><CODE>java.lang.InterruptedException</CODE> - if the current thread has been interrupted at a point at which interruption is detected, in which case state of the channel is unchanged (i.e., equivalent to a null return).</DL>
</DD>
</DL>
<HR>
<A NAME="allowTake()"><!-- --></A><H3>
allowTake</H3>
<PRE>
protected final void <B>allowTake</B>()</PRE>
<DL>
<DD>Notify a waiting take if needed
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="insert(java.lang.Object)"><!-- --></A><H3>
insert</H3>
<PRE>
protected void <B>insert</B>(java.lang.Object x)</PRE>
<DL>
<DD>Create and insert a node. Call only under synch on putGuard_
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.Object)"><!-- --></A><H3>
put</H3>
<PRE>
public void <B>put</B>(java.lang.Object x) throws java.lang.InterruptedException</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/dbunit/util/concurrent/Channel.html" title="interface in org.dbunit.util.concurrent">Channel</A></CODE></B></DD>
<DD>Place item in the channel, possibly waiting indefinitely until it can be accepted. Channels implementing the BoundedChannel subinterface are generally guaranteed to block on puts upon reaching capacity, but other implementations may or may not block.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/dbunit/util/concurrent/Channel.html#put(java.lang.Object)">put</A></CODE> in interface <CODE><A HREF="../../../../org/dbunit/util/concurrent/Channel.html" title="interface in org.dbunit.util.concurrent">Channel</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - the element to be inserted. Should be non-null.<DT><B>Throws:</B><DD><CODE>java.lang.InterruptedException</CODE> - if the current thread has been interrupted at a point at which interruption is detected, in which case the element is guaranteed not to be inserted. Otherwise, on normal return, the element is guaranteed to have been inserted.</DL>
</DD>
</DL>
<HR>
<A NAME="offer(java.lang.Object, long)"><!-- --></A><H3>
offer</H3>
<PRE>
public boolean <B>offer</B>(java.lang.Object x, long msecs) throws java.lang.InterruptedException</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/dbunit/util/concurrent/Channel.html" title="interface in org.dbunit.util.concurrent">Channel</A></CODE></B></DD>
<DD>Place item in channel only if it can be accepted within msecs milliseconds. The time bound is interpreted in a coarse-grained, best-effort fashion.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/dbunit/util/concurrent/Channel.html#offer(java.lang.Object, long)">offer</A></CODE> in interface <CODE><A HREF="../../../../org/dbunit/util/concurrent/Channel.html" title="interface in org.dbunit.util.concurrent">Channel</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - the element to be inserted. Should be non-null.<DD><CODE>msecs</CODE> - the number of milliseconds to wait. If less than or equal to zero, the method does not perform any timed waits, but might still require access to a synchronization lock, which can impose unbounded delay if there is a lot of contention for the channel.<DT><B>Returns:</B><DD>true if accepted, else false<DT><B>Throws:</B><DD><CODE>java.lang.InterruptedException</CODE> - if the current thread has been interrupted at a point at which interruption is detected, in which case the element is guaranteed not to be inserted (i.e., is equivalent to a false return).</DL>
</DD>
</DL>
<HR>
<A NAME="isEmpty()"><!-- --></A><H3>
isEmpty</H3>
<PRE>
public boolean <B>isEmpty</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BoundedLinkedQueue.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/dbunit/util/concurrent/BoundedChannel.html" title="interface in org.dbunit.util.concurrent"><B>PREV CLASS</B></A>
<A HREF="../../../../org/dbunit/util/concurrent/Channel.html" title="interface in org.dbunit.util.concurrent"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="BoundedLinkedQueue.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright © 2002-2004 DbUnit.org. All Rights Reserved.
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -