📄 jco.poolmanager.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Mon Jan 08 21:40:04 CET 2007 -->
<TITLE>
SAP Java Connector: Class JCO.PoolManager
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../jco.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JCO.PoolManager.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-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="../../../../com/sap/mw/jco/JCO.PoolChangedListener.html"><B>PREV CLASS</B></A>
<A HREF="../../../../com/sap/mw/jco/JCO.Record.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>
<A HREF="JCO.PoolManager.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.sap.mw.jco</FONT>
<BR>
Class JCO.PoolManager</H2>
<PRE>
java.lang.Object
|
+--<B>com.sap.mw.jco.JCO.PoolManager</B>
</PRE>
<DL>
<DT><B>Enclosing class: </B><DD><A HREF="../../../../com/sap/mw/jco/JCO.html">JCO</A></DD>
</DL>
<HR>
<DL>
<DT>public static class <B>JCO.PoolManager</B><DT>extends java.lang.Object</DL>
<P>
This manager handles all pool objects. It checks periodically which connections are no longer in use and can be closed in order to save valuable system resources. The time period after which the pool manager checks the connections as well as the time after which a connection will time-out can be configured by the calling application for each pool independently.
<P>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.PoolManager.html#addPool(java.lang.String, com.sap.mw.jco.JCO.Client, int)">addPool</A></B>(java.lang.String pool_name, <A HREF="../../../../com/sap/mw/jco/JCO.Client.html">JCO.Client</A> master, int max_pool_size)</CODE>
<BR>
Adds a new pool to the pools list</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.PoolManager.html#addPoolChangedListener(com.sap.mw.jco.JCO.PoolChangedListener)">addPoolChangedListener</A></B>(<A HREF="../../../../com/sap/mw/jco/JCO.PoolChangedListener.html">JCO.PoolChangedListener</A> listener)</CODE>
<BR>
Register a pool changed listener</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.PoolManager.html#detachFromPool(com.sap.mw.jco.JCO.Client)">detachFromPool</A></B>(<A HREF="../../../../com/sap/mw/jco/JCO.Client.html">JCO.Client</A> client)</CODE>
<BR>
Detaches a client-connection from the pool. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/sap/mw/jco/JCO.Client.html">JCO.Client</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.PoolManager.html#getClient(java.lang.String)">getClient</A></B>(java.lang.String pool_name)</CODE>
<BR>
Returns a new client connection from the specified pool.<br> <em>Note:</em> Any client obtained by this method <em>must</em> be released with <tt>JCO.releaseClient()</tt> if not needed anymore. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/sap/mw/jco/JCO.Client.html">JCO.Client</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.PoolManager.html#getClient(java.lang.String, boolean)">getClient</A></B>(java.lang.String pool_name, boolean reset)</CODE>
<BR>
Returns a new client connection from the specified pool and resets all resources associated with this connection. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.PoolManager.html#getConnectionTimeout()">getConnectionTimeout</A></B>()</CODE>
<BR>
Returns the default value for the connection timeout in milliseconds. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.PoolManager.html#getMaxWaitTime()">getMaxWaitTime</A></B>()</CODE>
<BR>
Returns the maximum time to wait in a connection request for a free connection. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/sap/mw/jco/JCO.Pool.html">JCO.Pool</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.PoolManager.html#getPool(java.lang.String)">getPool</A></B>(java.lang.String pool_name)</CODE>
<BR>
Returns the pool with the specified name or <tt>null</tt> if such a pool does not exist in the pool list</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.PoolManager.html#getPoolNames()">getPoolNames</A></B>()</CODE>
<BR>
Returns the array of pool names that are currently under control of the manager</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.PoolManager.html#getTimeoutCheckPeriod()">getTimeoutCheckPeriod</A></B>()</CODE>
<BR>
Returns the default value for the timeout check period in milliseconds. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.PoolManager.html#releaseClient(com.sap.mw.jco.JCO.Client)">releaseClient</A></B>(<A HREF="../../../../com/sap/mw/jco/JCO.Client.html">JCO.Client</A> client)</CODE>
<BR>
Returns the client connection to the pool.<br> On SAP systems equal or above 4.0A the method resets the connection, i.e. frees all resources and context allocated on the server side (i.e. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.PoolManager.html#removeConnection(com.sap.mw.jco.JCO.Connection)">removeConnection</A></B>(<A HREF="../../../../com/sap/mw/jco/JCO.Connection.html">JCO.Connection</A> connection)</CODE>
<BR>
<B>Deprecated.</B> <I>This method will be removed in the next release.<br>Use <code>JCO.releaseClient(connection) instead</code></I></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -