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

📄 semaphorecontrolledchannel.html

📁 dfdfddfskfjdsklfjksdljflksjfsjlkfdjlksfjkdsjfsdjkflsjkf
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</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="SemaphoreControlledChannel(int)"><!-- --></A><H3>
SemaphoreControlledChannel</H3>
<PRE>
public <B>SemaphoreControlledChannel</B>(int&nbsp;capacity)                           throws java.lang.IllegalArgumentException</PRE>
<DL>
<DD>Create a channel with the given capacity and default semaphore implementation
<P>
<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if capacity less or equal to zero</DL>
<HR>

<A NAME="SemaphoreControlledChannel(int, java.lang.Class)"><!-- --></A><H3>
SemaphoreControlledChannel</H3>
<PRE>
public <B>SemaphoreControlledChannel</B>(int&nbsp;capacity,                                  java.lang.Class&nbsp;semaphoreClass)                           throws java.lang.IllegalArgumentException,                                  java.lang.NoSuchMethodException,                                  java.lang.SecurityException,                                  java.lang.InstantiationException,                                  java.lang.IllegalAccessException,                                  java.lang.reflect.InvocationTargetException</PRE>
<DL>
<DD>Create a channel with the given capacity and  semaphore implementations instantiated from the supplied class
<P>
<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if capacity less or equal to zero.<DD><CODE>java.lang.NoSuchMethodException</CODE> - If class does not have constructor  that intializes permits<DD><CODE>java.lang.SecurityException</CODE> - if constructor information  not accessible<DD><CODE>java.lang.InstantiationException</CODE> - if semaphore class is abstract<DD><CODE>java.lang.IllegalAccessException</CODE> - if constructor cannot be called<DD><CODE>java.lang.reflect.InvocationTargetException</CODE> - if semaphore constructor throws an exception</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="capacity()"><!-- --></A><H3>
capacity</H3>
<PRE>
public int <B>capacity</B>()</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/dbunit/util/concurrent/BoundedChannel.html" title="interface in org.dbunit.util.concurrent">BoundedChannel</A></CODE></B></DD>
<DD>Return the maximum number of elements that can be held.
<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 buffer. This is only a snapshot value, that may change immediately after returning.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="insert(java.lang.Object)"><!-- --></A><H3>
insert</H3>
<PRE>
protected abstract void <B>insert</B>(java.lang.Object&nbsp;x)</PRE>
<DL>
<DD>Internal mechanics of put.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="extract()"><!-- --></A><H3>
extract</H3>
<PRE>
protected abstract java.lang.Object <B>extract</B>()</PRE>
<DL>
<DD>Internal mechanics of take.
<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&nbsp;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&nbsp;x,                     long&nbsp;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="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&nbsp;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>
<!-- ========= 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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SemaphoreControlledChannel.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/dbunit/util/concurrent/Semaphore.html" title="class in org.dbunit.util.concurrent"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/dbunit/util/concurrent/Slot.html" title="class 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>  &nbsp;
&nbsp;<A HREF="SemaphoreControlledChannel.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &copy; 2002-2004 DbUnit.org. All Rights Reserved.
</BODY>
</HTML>

⌨️ 快捷键说明

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