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

📄 writerpool.html

📁 用JAVA编写的,在做实验的时候留下来的,本来想删的,但是传上来,大家分享吧
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<A NAME="logger"><!-- --></A><H3>logger</H3><PRE>final java.util.logging.Logger <B>logger</B></PRE><DL><DL></DL></DL><HR><A NAME="NO_MAX_IDLE"><!-- --></A><H3>NO_MAX_IDLE</H3><PRE>protected static final int <B>NO_MAX_IDLE</B></PRE><DL><DD>Don't enforce a maximum number of idle instances in pool. To do so means GenericObjectPool will close files prematurely.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.archive.io.WriterPool.NO_MAX_IDLE">Constant Field Values</A></DL></DL><HR><A NAME="DEFAULT_MAX_ACTIVE"><!-- --></A><H3>DEFAULT_MAX_ACTIVE</H3><PRE>public static final int <B>DEFAULT_MAX_ACTIVE</B></PRE><DL><DD>Default maximum active number of files in the pool.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.archive.io.WriterPool.DEFAULT_MAX_ACTIVE">Constant Field Values</A></DL></DL><HR><A NAME="DEFAULT_MAXIMUM_WAIT"><!-- --></A><H3>DEFAULT_MAXIMUM_WAIT</H3><PRE>public static final int <B>DEFAULT_MAXIMUM_WAIT</B></PRE><DL><DD>Maximum time to wait on a free file..<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.archive.io.WriterPool.DEFAULT_MAXIMUM_WAIT">Constant Field Values</A></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="WriterPool(java.util.concurrent.atomic.AtomicInteger, org.apache.commons.pool.BasePoolableObjectFactory, org.archive.io.WriterPoolSettings, int, int)"><!-- --></A><H3>WriterPool</H3><PRE>public <B>WriterPool</B>(java.util.concurrent.atomic.AtomicInteger&nbsp;serial,                  org.apache.commons.pool.BasePoolableObjectFactory&nbsp;factory,                  <A HREF="../../../org/archive/io/WriterPoolSettings.html" title="interface in org.archive.io">WriterPoolSettings</A>&nbsp;settings,                  int&nbsp;poolMaximumActive,                  int&nbsp;poolMaximumWait)</PRE><DL><DD>Constructor<P><DL><DT><B>Parameters:</B><DD><CODE>serial</CODE> - Used to generate unique filename sequences<DD><CODE>factory</CODE> - Factory that knows how to make a <A HREF="../../../org/archive/io/WriterPoolMember.html" title="class in org.archive.io"><CODE>WriterPoolMember</CODE></A>.<DD><CODE>settings</CODE> - Settings for this pool.<DD><CODE>poolMaximumActive</CODE> - <DD><CODE>poolMaximumWait</CODE> - </DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="borrowFile()"><!-- --></A><H3>borrowFile</H3><PRE>public <A HREF="../../../org/archive/io/WriterPoolMember.html" title="class in org.archive.io">WriterPoolMember</A> <B>borrowFile</B>()                            throws java.io.IOException</PRE><DL><DD>Check out a <A HREF="../../../org/archive/io/WriterPoolMember.html" title="class in org.archive.io"><CODE>WriterPoolMember</CODE></A>.  This method must be answered by a call to <A HREF="../../../org/archive/io/WriterPool.html#returnFile(org.archive.io.WriterPoolMember)"><CODE>returnFile(WriterPoolMember)</CODE></A> else pool starts leaking.<P><DD><DL><DT><B>Returns:</B><DD>Writer checked out of a pool of files.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - Problem getting Writer from pool (Converted from Exception to IOException so this pool can live as a good citizen down in depths of ARCSocketFactory).<DD><CODE>java.util.NoSuchElementException</CODE> - If we time out waiting on a pool member.</DL></DD></DL><HR><A NAME="returnFile(org.archive.io.WriterPoolMember)"><!-- --></A><H3>returnFile</H3><PRE>public void <B>returnFile</B>(<A HREF="../../../org/archive/io/WriterPoolMember.html" title="class in org.archive.io">WriterPoolMember</A>&nbsp;writer)                throws java.io.IOException</PRE><DL><DD><DL><DT><B>Parameters:</B><DD><CODE>writer</CODE> - Writer to return to the pool.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - Problem returning File to pool.</DL></DD></DL><HR><A NAME="invalidateFile(org.archive.io.WriterPoolMember)"><!-- --></A><H3>invalidateFile</H3><PRE>public void <B>invalidateFile</B>(<A HREF="../../../org/archive/io/WriterPoolMember.html" title="class in org.archive.io">WriterPoolMember</A>&nbsp;f)                    throws java.io.IOException</PRE><DL><DD><DL><DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="getNumActive()"><!-- --></A><H3>getNumActive</H3><PRE>public int <B>getNumActive</B>()                 throws java.lang.UnsupportedOperationException</PRE><DL><DD><DL><DT><B>Returns:</B><DD>Number of <A HREF="../../../org/archive/io/WriterPoolMember.html" title="class in org.archive.io"><CODE>WriterPoolMember</CODE></A>s checked out of pool.<DT><B>Throws:</B><DD><CODE>java.lang.UnsupportedOperationException</CODE></DL></DD></DL><HR><A NAME="getNumIdle()"><!-- --></A><H3>getNumIdle</H3><PRE>public int <B>getNumIdle</B>()               throws java.lang.UnsupportedOperationException</PRE><DL><DD><DL><DT><B>Returns:</B><DD>Number of <A HREF="../../../org/archive/io/WriterPoolMember.html" title="class in org.archive.io"><CODE>WriterPoolMember</CODE></A> instances still in the pool.<DT><B>Throws:</B><DD><CODE>java.lang.UnsupportedOperationException</CODE></DL></DD></DL><HR><A NAME="close()"><!-- --></A><H3>close</H3><PRE>public void <B>close</B>()</PRE><DL><DD>Close all <A HREF="../../../org/archive/io/WriterPoolMember.html" title="class in org.archive.io"><CODE>WriterPoolMember</CODE></A>s in pool.<P><DD><DL></DL></DD></DL><HR><A NAME="getSettings()"><!-- --></A><H3>getSettings</H3><PRE>public <A HREF="../../../org/archive/io/WriterPoolSettings.html" title="interface in org.archive.io">WriterPoolSettings</A> <B>getSettings</B>()</PRE><DL><DD><DL><DT><B>Returns:</B><DD>Returns settings.</DL></DD></DL><HR><A NAME="getPoolState()"><!-- --></A><H3>getPoolState</H3><PRE>protected java.lang.String <B>getPoolState</B>()</PRE><DL><DD><DL><DT><B>Returns:</B><DD>State of the pool string</DL></DD></DL><HR><A NAME="getPoolState(long)"><!-- --></A><H3>getPoolState</H3><PRE>protected java.lang.String <B>getPoolState</B>(long&nbsp;startTime)</PRE><DL><DD><DL><DT><B>Parameters:</B><DD><CODE>startTime</CODE> - If we are passed a start time, we'll add difference between it and now to end of string.  Pass -1 if don't want this added to end of state string.<DT><B>Returns:</B><DD>State of the pool string</DL></DD></DL><HR><A NAME="getSerialNo()"><!-- --></A><H3>getSerialNo</H3><PRE>public java.util.concurrent.atomic.AtomicInteger <B>getSerialNo</B>()</PRE><DL><DD>Returns the atomic integer used to generate serial numbers for files.<P><DD><DL><DT><B>Returns:</B><DD>the serial number generator</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=2 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/WriterPool.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/archive/io/Warc2Arc.html" title="class in org.archive.io"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../org/archive/io/WriterPoolMember.html" title="class in org.archive.io"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?org/archive/io/WriterPool.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="WriterPool.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; 2003-2006 Internet Archive. All Rights Reserved.</BODY></HTML>

⌨️ 快捷键说明

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