<!--$Id: rep_timeout.so,v 1.5 2007/03/02 18:46:41 bostic Exp $--> <!--Copyright (c) 1997,2007 Oracle. All rights reserved.--> <!--See the file LICENSE for redistribution information.--> <html> <head> <title>Berkeley DB: DB_ENV->rep_set_timeout</title> <meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> <meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> </head> <body bgcolor=white> <table width="100%"><tr valign=top> <td> <h3>DB_ENV->rep_set_timeout</h3> </td> <td align=right> <a href="../../db46-devel-4.6.21/api_c/api_core.html"><img src="../../db46-devel-4.6.21/images/api.gif" alt="API"></a> <a href="../../db46-devel-4.6.21/ref/toc.html"><img src="../../db46-devel-4.6.21/images/ref.gif" alt="Ref"></a></td> </tr></table> <hr size=1 noshade> <tt> <h3><pre> #include <db.h> <p> int DB_ENV->rep_set_timeout(DB_ENV *env, int which, u_int32_t timeout); <p> int DB_ENV->rep_get_timeout(DB_ENV *env, int which, u_int32_t *timeoutp); </pre></h3> <hr size=1 noshade> <h3>Description: DB_ENV->rep_set_timeout</h3> <p>The DB_ENV->rep_set_timeout method specifies a variety of replication timeout values.</p> <p>The DB_ENV->rep_set_timeout method configures a database environment, not only operations performed using the specified <a href="../../db46-devel-4.6.21/api_c/env_class.html">DB_ENV</a> handle.</p> <p>The DB_ENV->rep_set_timeout method may be called at any time during the life of the application.</p> <p>The DB_ENV->rep_set_timeout method returns a non-zero error value on failure and 0 on success. </p> <h3>Parameters</h3> <dl compact> <dt><b>which</b><dd>The <b>which</b> parameter must be set to one of the following values: <dl compact> <dt><a name="DB_REP_ACK_TIMEOUT">DB_REP_ACK_TIMEOUT</a><dd>Configure the amount of time the replication manager's transport function waits to collect enough acknowledgments from replication group clients, before giving up and returning a failure indication. The default wait time is 1 second. <dt><a name="DB_REP_CHECKPOINT_DELAY">DB_REP_CHECKPOINT_DELAY</a><dd>Configure the amount of time the replication manager will delay between completing a checkpoint and writing a checkpoint record into the log. This delay allows clients to complete their own checkpoints before the master requires completion of them. The default is 30 seconds. <dt><a name="DB_REP_CONNECTION_RETRY">DB_REP_CONNECTION_RETRY</a><dd>Configure the amount of time the replication manager will wait before trying to re-establish a connection to another site after a communication failure. The default wait time is 30 seconds. <dt><a name="DB_REP_ELECTION_TIMEOUT">DB_REP_ELECTION_TIMEOUT</a><dd>The timeout period for an election. The default timeout is 2 seconds. <dt><a name="DB_REP_ELECTION_RETRY">DB_REP_ELECTION_RETRY</a><dd>Configure the amount of time the replication manager will wait before retrying a failed election. The default wait time is 10 seconds. <dt><a name="DB_REP_FULL_ELECTION_TIMEOUT">DB_REP_FULL_ELECTION_TIMEOUT</a><dd>An optional configuration timeout period to wait for full election participation the first time the replication group finds a master. By default this option is turned off and normal election timeouts are used. (See the <a href="../../db46-devel-4.6.21/ref/rep/elect.html">Elections</a> section in the Berkeley DB Reference Guide for more information.) </dl> <dt><b>timeout</b><dd>The <b>timeout</b> parameter is the timeout value. It must be specified as an unsigned 32-bit number of microseconds, limiting the maximum timeout to roughly 71 minutes. </dl> <h3>Errors</h3> <p>The DB_ENV->rep_set_timeout method may fail and return one of the following non-zero errors:</p> <dl compact> <dt>EINVAL<dd>An invalid flag value or parameter was specified. </dl> <hr size=1 noshade> <h3>Description: DB_ENV->rep_get_timeout</h3> <p>The DB_ENV->rep_get_timeout method returns the timeout value for the specified <b>which</b> parameter.</p> <p>The DB_ENV->rep_get_timeout method may be called at any time during the life of the application.</p> <p>The DB_ENV->rep_get_timeout method returns a non-zero error value on failure and 0 on success. </p> <h3>Parameters</h3> <dl compact> <dt><b>which</b><dd>The <b>which</b> parameter is the timeout value for which the value is being returned. <dt><b>timeoutp</b><dd>The <b>timeoutp</b> parameter references memory into which the timeout value of the specified <b>which</b> parameter is copied. The returned <b>timeout</b> value is in microseconds. </dl> <hr size=1 noshade> <h3>Class</h3> <a href="../../db46-devel-4.6.21/api_c/env_class.html">DB_ENV</a> <h3>See Also</h3> <a href="../../db46-devel-4.6.21/api_c/rep_list.html">Replication and Related Methods</a> </tt> <table width="100%"><tr><td><br></td><td align=right> <a href="../../db46-devel-4.6.21/api_c/api_core.html"><img src="../../db46-devel-4.6.21/images/api.gif" alt="API"></a><a href="../../db46-devel-4.6.21/ref/toc.html"><img src="../../db46-devel-4.6.21/images/ref.gif" alt="Ref"></a> </td></tr></table> <p><font size=1>Copyright (c) 1996,2007 Oracle. All rights reserved.</font> </body> </html>