⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 boundedlinkedqueue.html

📁 dfdfddfskfjdsklfjksdljflksjfsjlkfdjlksfjkdsjfsdjkflsjkf
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/dbunit/util/concurrent/BoundedLinkedQueue.html#peek()">peek</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return, but do not remove object at head of Channel, or null if it is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/dbunit/util/concurrent/BoundedLinkedQueue.html#poll(long)">poll</A></B>(long&nbsp;msecs)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return and remove an item from channel only if one is available within msecs milliseconds.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/dbunit/util/concurrent/BoundedLinkedQueue.html#put(java.lang.Object)">put</A></B>(java.lang.Object&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Place item in the channel, possibly waiting indefinitely until it can be accepted.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/dbunit/util/concurrent/BoundedLinkedQueue.html#reconcilePutPermits()">reconcilePutPermits</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Move put permits from take side to put side;  return the number of put side permits that are available.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/dbunit/util/concurrent/BoundedLinkedQueue.html#setCapacity(int)">setCapacity</A></B>(int&nbsp;newCapacity)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reset the capacity of this queue.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/dbunit/util/concurrent/BoundedLinkedQueue.html#size()">size</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the number of elements in the queue.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/dbunit/util/concurrent/BoundedLinkedQueue.html#take()">take</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return and remove an item from channel,  possibly waiting indefinitely until such an item exists.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="head_"><!-- --></A><H3>
head_</H3>
<PRE>
protected <A HREF="../../../../org/dbunit/util/concurrent/LinkedNode.html" title="class in org.dbunit.util.concurrent">LinkedNode</A> <B>head_</B></PRE>
<DL>
<DD>Dummy header node of list. The first actual node, if it exists, is always  at head_.next. After each take, the old first node becomes the head.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="last_"><!-- --></A><H3>
last_</H3>
<PRE>
protected <A HREF="../../../../org/dbunit/util/concurrent/LinkedNode.html" title="class in org.dbunit.util.concurrent">LinkedNode</A> <B>last_</B></PRE>
<DL>
<DD>The last node of list. Put() appends to list, so modifies last_
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="putGuard_"><!-- --></A><H3>
putGuard_</H3>
<PRE>
protected final java.lang.Object <B>putGuard_</B></PRE>
<DL>
<DD>Helper monitor. Ensures that only one put at a time executes.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="takeGuard_"><!-- --></A><H3>
takeGuard_</H3>
<PRE>
protected final java.lang.Object <B>takeGuard_</B></PRE>
<DL>
<DD>Helper monitor. Protects and provides wait queue for takes
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="capacity_"><!-- --></A><H3>
capacity_</H3>
<PRE>
protected int <B>capacity_</B></PRE>
<DL>
<DD>Number of elements allowed
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="putSidePutPermits_"><!-- --></A><H3>
putSidePutPermits_</H3>
<PRE>
protected int <B>putSidePutPermits_</B></PRE>
<DL>
<DD>One side of a split permit count.  The counts represent permits to do a put. (The queue is full when zero). Invariant: putSidePutPermits_ + takeSidePutPermits_ = capacity_ - length. (The length is never separately recorded, so this cannot be checked explicitly.) To minimize contention between puts and takes, the put side uses up all of its permits before transfering them from the take side. The take side just increments the count upon each take. Thus, most puts and take can run independently of each other unless the queue is empty or full.  Initial value is queue capacity.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="takeSidePutPermits_"><!-- --></A><H3>
takeSidePutPermits_</H3>
<PRE>
protected int <B>takeSidePutPermits_</B></PRE>
<DL>
<DD>Number of takes since last reconcile
<P>
<DL>
</DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="BoundedLinkedQueue(int)"><!-- --></A><H3>
BoundedLinkedQueue</H3>
<PRE>
public <B>BoundedLinkedQueue</B>(int&nbsp;capacity)</PRE>
<DL>
<DD>Create a queue with the given capacity
<P>
<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if capacity less or equal to zero</DL>
<HR>

<A NAME="BoundedLinkedQueue()"><!-- --></A><H3>
BoundedLinkedQueue</H3>
<PRE>
public <B>BoundedLinkedQueue</B>()</PRE>
<DL>
<DD>Create a queue with the current default capacity
<P>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="reconcilePutPermits()"><!-- --></A><H3>
reconcilePutPermits</H3>
<PRE>
protected final int <B>reconcilePutPermits</B>()</PRE>
<DL>
<DD>Move put permits from take side to put side;  return the number of put side permits that are available. Call only under synch on puGuard_ AND this.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="capacity()"><!-- --></A><H3>
capacity</H3>
<PRE>
public int <B>capacity</B>()</PRE>
<DL>
<DD>Return the current capacity of this queue
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/dbunit/util/concurrent/BoundedChannel.html#capacity()">capacity</A></CODE> in interface <CODE><A HREF="../../../../org/dbunit/util/concurrent/BoundedChannel.html" title="interface in org.dbunit.util.concurrent">BoundedChannel</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the capacity of this channel.</DL>
</DD>
</DL>
<HR>

<A NAME="size()"><!-- --></A><H3>
size</H3>
<PRE>
public int <B>size</B>()</PRE>
<DL>
<DD>Return the number of elements in the queue. This is only a snapshot value, that may be in the midst  of changing. The returned value will be unreliable in the presence of active puts and takes, and should only be used as a heuristic estimate, for example for resource monitoring purposes.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setCapacity(int)"><!-- --></A><H3>
setCapacity</H3>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -