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

📄 jco.pool.html

📁 SAP ERP的二次开发
💻 HTML
📖 第 1 页 / 共 3 页
字号:

<A NAME="getMaxConnections()"><!-- --></A><H3>
getMaxConnections</H3>
<PRE>
public final int <B>getMaxConnections</B>()</PRE>
<DL>
<DD>Returns the maximum number of connections that can be allocated from  the pool.<DD><DL>
<DT><B>Returns:</B><DD>the maximum number of connections that can be allocated from  the pool<DT><B>See Also: </B><DD><A HREF="../../../../com/sap/mw/jco/JCO.Pool.html#setMaxConnections(int)"><CODE>setMaxConnections(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setMaxConnections(int)"><!-- --></A><H3>
setMaxConnections</H3>
<PRE>
public final void <B>setMaxConnections</B>(int&nbsp;max_connections)</PRE>
<DL>
<DD>Sets the maximum number of connections which can be allocated from  the pool. This allows you to create more connections as specified by  the <tt>MaxPoolSize</tt> property, for example for temporary peak  usage times.  <em>Note: If the new value for <tt>MaxConnections</tt> is less than the  <tt>MaxPoolSize</tt>, the <tt>MaxPoolSize</tt> will be resized automatically.</em><DD><DL>
<DT><B>Parameters:</B><DD><CODE>max_connections</CODE> - maximum numbert of connections<DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/sap/mw/jco/JCO.Exception.html">JCO.Exception</A></CODE> - if an error occurs during resizing of pool<DT><B>See Also: </B><DD><A HREF="../../../../com/sap/mw/jco/JCO.Pool.html#setMaxPoolSize(int)"><CODE>setMaxPoolSize(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getCurrentPoolSize()"><!-- --></A><H3>
getCurrentPoolSize</H3>
<PRE>
public final int <B>getCurrentPoolSize</B>()</PRE>
<DL>
<DD>Returns the number of connections that are created for this pool and are currently alive. <br/> That is the number of the connections that have been allocated by the application with the <code>getClient(pool_name)</code> method plus the number of connections that are currently held by the pool (being the connections that have been previuosly released with the <code>releaseClient(client)</code> method).<DD><DL>
<DT><B>Returns:</B><DD>the current pool size</DL>
</DD>
</DL>
<HR>

<A NAME="getMaxUsed()"><!-- --></A><H3>
getMaxUsed</H3>
<PRE>
public final int <B>getMaxUsed</B>()</PRE>
<DL>
<DD>Returns the max. number of connections used simultaneously so far<DD><DL>
<DT><B>Returns:</B><DD>the max. number of connections used simultaneously so far</DL>
</DD>
</DL>
<HR>

<A NAME="getNumUsed()"><!-- --></A><H3>
getNumUsed</H3>
<PRE>
public final int <B>getNumUsed</B>()</PRE>
<DL>
<DD>Returns the number of connections in the pool which are  currently reserved by the application due to calls to  <tt>JCO.getClient().</tt><DD><DL>
<DT><B>Returns:</B><DD>the current number of reserved connections in the pool</DL>
</DD>
</DL>
<HR>

<A NAME="getNumWaitingThreads()"><!-- --></A><H3>
getNumWaitingThreads</H3>
<PRE>
public final int <B>getNumWaitingThreads</B>()</PRE>
<DL>
<DD>Returns the number of threads that are waiting for a connection.<DD><DL>
<DT><B>Returns:</B><DD>the current number of threads waiting for a connection.</DL>
</DD>
</DL>
<HR>

<A NAME="setMaxWaitTime(long)"><!-- --></A><H3>
setMaxWaitTime</H3>
<PRE>
public final void <B>setMaxWaitTime</B>(long&nbsp;max_wait_time)</PRE>
<DL>
<DD>Sets the maximum time to wait in a connection request for a free  connection. If the pool is exhausted and after the specified time  still no connection became available a <tt>JCO.Exception</tt>  with the key <tt>JCO_ERROR_RESOURCE</tt> will be thrown.  The default value is 30 seconds.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>max_wait_time</CODE> - the maximum time to wait for a free connection  in milliseconds</DL>
</DD>
</DL>
<HR>

<A NAME="getMaxWaitTime()"><!-- --></A><H3>
getMaxWaitTime</H3>
<PRE>
public final long <B>getMaxWaitTime</B>()</PRE>
<DL>
<DD>Returns the maximum time to wait in a connection request for a free  connection.<DD><DL>
<DT><B>Returns:</B><DD>Returns the maximum time to wait for a free connection  in milliseconds</DL>
</DD>
</DL>
<HR>

<A NAME="getConnectionTimeout()"><!-- --></A><H3>
getConnectionTimeout</H3>
<PRE>
public long <B>getConnectionTimeout</B>()</PRE>
<DL>
<DD>Returns the connection timeout in milliseconds.  The timeout can be changed by calling <tt>JCO.Pool.setConnectionTimeout()</tt>  for this pool instance or by calling <tt>JCO.PoolManager.setConnectionTimeout()</tt>  for all pools that will be newly created afterwards.<br>  The default value is 10 minutes (600000 ms).<DD><DL>
<DT><B>Returns:</B><DD>the connection timeout in milliseconds<DT><B>See Also: </B><DD><A HREF="../../../../com/sap/mw/jco/JCO.Pool.html#setMaxWaitTime(long)"><CODE>setMaxWaitTime(long)</CODE></A>, 
<A HREF="../../../../com/sap/mw/jco/JCO.Pool.html#setConnectionTimeout(long)"><CODE>setConnectionTimeout(long)</CODE></A>, 
<CODE>PoolManager#setConnectionTimeout(long)</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="setConnectionTimeout(long)"><!-- --></A><H3>
setConnectionTimeout</H3>
<PRE>
public void <B>setConnectionTimeout</B>(long&nbsp;connection_timeout)</PRE>
<DL>
<DD>Sets the connection timeout in milliseconds.  This property only affects connections that have been previously  released to the pool and are held open by the pool for possible future  reuse. It does not affect connections that have been requested from  the pool and are currently under control of an user application.  A pooled connection is being regarded as timed out when there has  been no activity on it for the specified time interval.<br>  The default value is 10 minutes (600000 ms).<DD><DL>
<DT><B>Parameters:</B><DD><CODE>connection_timeout</CODE> - the new value for the connection timeout in milliseconds<DT><B>See Also: </B><DD><A HREF="../../../../com/sap/mw/jco/JCO.Pool.html#getConnectionTimeout()"><CODE>getConnectionTimeout()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getTimeoutCheckPeriod()"><!-- --></A><H3>
getTimeoutCheckPeriod</H3>
<PRE>
public long <B>getTimeoutCheckPeriod</B>()</PRE>
<DL>
<DD>Returns the timeout check period in milliseconds. It specifies the  periodical time interval after which all connections that have been  released to the pool and are held open by the pool for possible future  reuse are being checked for timeouts. Connections that have not been  used for at least the <tt>connection timeout</tt> interval will be  closed.<br>  The default value is 60 seconds (60000 ms).<DD><DL>
<DT><B>Returns:</B><DD>the timeout check period in milliseconds</DL>
</DD>
</DL>
<HR>

<A NAME="setTimeoutCheckPeriod(long)"><!-- --></A><H3>
setTimeoutCheckPeriod</H3>
<PRE>
public void <B>setTimeoutCheckPeriod</B>(long&nbsp;timeout_check_period)</PRE>
<DL>
<DD>Sets the timeout check period in milliseconds. It specifies the  periodical time interval after which all connections that have been  released to the pool and are held open by the pool for possible future  reuse are being checked for timeouts. Connections that have not been  used for at least the <tt>connection timeout</tt> interval will be  closed.<br>  A timeout check period of <tt>0</tt> disables the timeout checks.<br>  The default value is 60 seconds (60000 ms).<DD><DL>
<DT><B>Parameters:</B><DD><CODE>timeout_check_period</CODE> - the timeout check period in milliseconds.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if timeout_check_period is negative.<DT><B>See Also: </B><DD><A HREF="../../../../com/sap/mw/jco/JCO.Pool.html#getTimeoutCheckPeriod()"><CODE>getTimeoutCheckPeriod()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getStates()"><!-- --></A><H3>
getStates</H3>
<PRE>
public final byte[] <B>getStates</B>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>This method will be removed in the next release. <br>Use <code>getNumUsed()</code>, <code>getCurrentPoolSize()</code> instead</I>
<P>
<DD>This method is not supported. Use  <code>getNumUsed()</code>, <code>getCurrentPoolSize()</code>  to get information about allocated clients and the free client  connections remained in the pool.  Returns an empty array for backwards compatibility.<DD><DL>
<DT><B>Returns:</B><DD>empty byte array<DT><B>See Also: </B><DD><A HREF="../../../../com/sap/mw/jco/JCO.Pool.html#getNumUsed()"><CODE>getNumUsed()</CODE></A>, 
<A HREF="../../../../com/sap/mw/jco/JCO.Pool.html#getCurrentPoolSize()"><CODE>getCurrentPoolSize()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="detachFromPool(com.sap.mw.jco.JCO.Client)"><!-- --></A><H3>
detachFromPool</H3>
<PRE>
public void <B>detachFromPool</B>(<A HREF="../../../../com/sap/mw/jco/JCO.Client.html">JCO.Client</A>&nbsp;client)</PRE>
<DL>
<DD>Detaches a client-connection from the pool. The client wont be closed. This method converts a pooled client to a single client. Only pooled clients, those aren't released, can be detached from its pool.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>client</CODE> - the client connection which is being returned to its pool<DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/sap/mw/jco/JCO.Exception.html">JCO.Exception</A></CODE> - thrown if a connection could not be removed from pool                cleanly</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/JCO.Pool.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-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="../../../../com/sap/mw/jco/JCO.ParameterList.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/sap/mw/jco/JCO.PoolChangedListener.html"><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="JCO.Pool.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&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;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>

</BODY>
</HTML>

⌨️ 快捷键说明

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