Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-testing > by-pkgid > 91128064e1b251eab84e1c0e3ea0dd7a > files > 142

lib64mysql-devel-5.0.51a-8mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Ndb_cluster_connection Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.5 -->
<div class="contents">
<h1>Ndb_cluster_connection Class Reference</h1><!-- doxytag: class="Ndb_cluster_connection" --><code>#include &lt;ndb_cluster_connection.hpp&gt;</code>
<p>

<p>
<a href="classNdb__cluster__connection-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
Represents a connection to a cluster of storage nodes. 
<p>
Any NDB application program should begin with the creation of a single <a class="el" href="classNdb__cluster__connection.html" title="Represents a connection to a cluster of storage nodes.">Ndb_cluster_connection</a> object, and should make use of one and only one <a class="el" href="classNdb__cluster__connection.html" title="Represents a connection to a cluster of storage nodes.">Ndb_cluster_connection</a>. The application connects to a cluster management server when this object's <a class="el" href="classNdb__cluster__connection.html#1c1523c47bc56f17beb5c7e9124f7f47">connect()</a> method is called. By using the <a class="el" href="classNdb__cluster__connection.html#02f01d4e1dba63679a4796838e3c3c7a">wait_until_ready()</a> method it is possible to wait for the connection to reach one or more storage nodes. <h2>Public Member Functions</h2>
<ul>
<li><a class="el" href="classNdb__cluster__connection.html#b9a09f52fb7c1b3a088773b927018b5f">Ndb_cluster_connection</a> (const char *connectstring=0)
<li>void <a class="el" href="classNdb__cluster__connection.html#5dd29c510da2aeb99b28099c5738449a">set_name</a> (const char *name)
<li>int <a class="el" href="classNdb__cluster__connection.html#1c1523c47bc56f17beb5c7e9124f7f47">connect</a> (int no_retries=0, int retry_delay_in_seconds=1, int verbose=0)
<li>int <a class="el" href="classNdb__cluster__connection.html#02f01d4e1dba63679a4796838e3c3c7a">wait_until_ready</a> (int timeout_for_first_alive, int timeout_after_first_alive)
</ul>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="b9a09f52fb7c1b3a088773b927018b5f"></a><!-- doxytag: member="Ndb_cluster_connection::Ndb_cluster_connection" ref="b9a09f52fb7c1b3a088773b927018b5f" args="(const char *connectstring=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Ndb_cluster_connection::Ndb_cluster_connection           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>connectstring</em> = <code>0</code>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create a connection to a cluster of storage nodes<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>connectstring</em>&nbsp;</td><td>The connectstring for where to find the management server </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="5dd29c510da2aeb99b28099c5738449a"></a><!-- doxytag: member="Ndb_cluster_connection::set_name" ref="5dd29c510da2aeb99b28099c5738449a" args="(const char *name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Ndb_cluster_connection::set_name           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set a name on the connection, which will be reported in cluster log<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td></td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="1c1523c47bc56f17beb5c7e9124f7f47"></a><!-- doxytag: member="Ndb_cluster_connection::connect" ref="1c1523c47bc56f17beb5c7e9124f7f47" args="(int no_retries=0, int retry_delay_in_seconds=1, int verbose=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Ndb_cluster_connection::connect           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>no_retries</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>retry_delay_in_seconds</em> = <code>1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>verbose</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Connect to a cluster management server<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>no_retries</em>&nbsp;</td><td>specifies the number of retries to attempt in the event of connection failure; a negative value will result in the attempt to connect being repeated indefinitely</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>retry_delay_in_seconds</em>&nbsp;</td><td>specifies how often retries should be performed</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>verbose</em>&nbsp;</td><td>specifies if the method should print a report of its progess</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 = success, 1 = recoverable error, -1 = non-recoverable error </dd></dl>

</div>
</div><p>
<a class="anchor" name="02f01d4e1dba63679a4796838e3c3c7a"></a><!-- doxytag: member="Ndb_cluster_connection::wait_until_ready" ref="02f01d4e1dba63679a4796838e3c3c7a" args="(int timeout_for_first_alive, int timeout_after_first_alive)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Ndb_cluster_connection::wait_until_ready           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>timeout_for_first_alive</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>timeout_after_first_alive</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Wait until the requested connection with one or more storage nodes is successful<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>timeout_for_first_alive</em>&nbsp;</td><td>Number of seconds to wait until first live node is detected </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>timeout_after_first_alive</em>&nbsp;</td><td>Number of seconds to wait after first live node is detected</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>= 0 all nodes live, &gt; 0 at least one node live, &lt; 0 error </dd></dl>

</div>
</div><p>
</div>
<hr>
<address>
<small>
<center>
Documentation generated Sun Apr 20 06:25:31 2008 from mysql source files.<br>
&copy; 2003-2004 
<a href="http://www.mysql.com">MySQL AB</a>
<br>
</center>
</small></address>
</body>
</html>