CHips L MINI SHELL

CHips L pro

Current Path : /proc/2/cwd/usr/share/doc/db4-devel-4.7.25/api_cxx/
Upload File :
Current File : //proc/2/cwd/usr/share/doc/db4-devel-4.7.25/api_cxx/rep_config.html

<!--$Id: rep_config.so,v 1.10 2008/01/19 14:12:59 bostic Exp $-->
<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DbEnv::rep_set_config</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>
<b>DbEnv::rep_set_config</b>
</td>
<td align=right>
<a href="../../db4-devel-4.7.25/api_cxx/api_core.html"><img src="../../db4-devel-4.7.25/images/api.gif" alt="API"></a>
<a href="../../db4-devel-4.7.25/ref/toc.html"><img src="../../db4-devel-4.7.25/images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db_cxx.h&gt;
<p>
int
DbEnv::rep_set_config(u_int32_t which, int onoff);
<p>
int
DbEnv::rep_get_config(u_int32_t which, int *onoffp);
</pre></b>
<hr size=1 noshade>
<b>Description: DbEnv::rep_set_config</b>
<p>The DbEnv::rep_set_config method method configures the Berkeley DB replication
subsystem.</p>
<p>The database environment's replication subsystem may also be configured using the
environment's <a href="../../db4-devel-4.7.25/ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file.  The syntax of the entry in that
file is a single line with the string "rep_set_config", one or more whitespace
characters, and the method <b>which</b> parameter as a string; for example,
"rep_set_config DB_REP_CONF_NOWAIT".
Because the <a href="../../db4-devel-4.7.25/ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file is read when the database environment
is opened, it will silently overrule configuration done before that
time.</p>
<p>The DbEnv::rep_set_config method configures a database environment, not only operations
performed using the specified <a href="../../db4-devel-4.7.25/api_cxx/env_class.html">DbEnv</a> handle.</p>
<p>The DbEnv::rep_set_config method may be called at any time during the life of the
application.</p>
<p>The DbEnv::rep_set_config method
either returns a non-zero error value
or throws an exception that encapsulates a non-zero error value on
failure, and returns 0 on success.
</p>
<b>Parameters</b> <br>
 <b>onoff</b><ul compact><li>If the <b>onoff</b> parameter is zero, the configuration flag is turned
off.  Otherwise, it is turned on.</ul>
 <b>which</b><ul compact><li>The <b>which</b> parameter must be set to one of the following values:
<br>
<b><a name="DB_REP_CONF_BULK">DB_REP_CONF_BULK</a></b><ul compact><li>The replication master sends groups of records to the clients in a
single network transfer (defaults to off).</ul>
<b><a name="DB_REP_CONF_DELAYCLIENT">DB_REP_CONF_DELAYCLIENT</a></b><ul compact><li>The client should delay synchronizing to a newly declared master
(defaults to off).  Clients configured in this way will remain
unsynchronized until the application calls the <a href="../../db4-devel-4.7.25/api_cxx/rep_sync.html">DbEnv::rep_sync</a> method.</ul>
<b><a name="DB_REP_CONF_LEASE">DB_REP_CONF_LEASE</a></b><ul compact><li>Master leases will be used for this site (defaults to off).
<p>Configuring this option may result in <a name="DB_REP_LEASE_EXPIRED">DB_REP_LEASE_EXPIRED</a>
error returns from the <a href="../../db4-devel-4.7.25/api_cxx/db_get.html">Db::get</a> and <a href="../../db4-devel-4.7.25/api_cxx/dbc_get.html">Dbc::get</a> methods when
attempting to read entries from a database after the site's master lease
has expired.</p>
<p>The DbEnv::rep_set_config method may not be called after the <a href="../../db4-devel-4.7.25/api_cxx/repmgr_start.html">DbEnv::repmgr_start</a> or <a href="../../db4-devel-4.7.25/api_cxx/rep_start.html">DbEnv::rep_start</a> methods are
called.</p>
Once this option is turned on, it may never be turned off.</ul>
<b><a name="DB_REP_CONF_NOAUTOINIT">DB_REP_CONF_NOAUTOINIT</a></b><ul compact><li>The replication master will not automatically re-initialize outdated
clients (defaults to off).</ul>
<b><a name="DB_REP_CONF_NOWAIT">DB_REP_CONF_NOWAIT</a></b><ul compact><li>Berkeley DB method calls that would normally block while clients are in
recovery will return errors immediately (defaults to off).</ul>
<b><a name="DB_REPMGR_CONF_2SITE_STRICT">DB_REPMGR_CONF_2SITE_STRICT</a></b><ul compact><li>Replication Manager observes the strict "majority" rule in managing
elections, even in a group with only 2 sites.  This means the client in
a 2-site group will be unable to take over as master if the original
master fails or becomes disconnected.  (See the
<a href="../../db4-devel-4.7.25/ref/rep/elect.html">Elections</a> section in the Berkeley DB
Reference Guide for more information.)  Both sites in the replication
group should have the same value for this parameter.</ul>
<br></ul>
<br>
<br><b>Errors</b>
<p>The DbEnv::rep_set_config method
may fail and throw
<a href="../../db4-devel-4.7.25/api_cxx/except_class.html">DbException</a>,
encapsulating one of the following non-zero errors, or return one of
the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<b>Description: DbEnv::rep_get_config</b>
<p>The DbEnv::rep_get_config method returns whether the specified <b>which</b>
parameter is currently set or not.</p>
<p>The DbEnv::rep_get_config method may be called at any time during the life of the
application.</p>
<p>The DbEnv::rep_get_config method
either returns a non-zero error value
or throws an exception that encapsulates a non-zero error value on
failure, and returns 0 on success.
</p>
<b>Parameters</b> <br>
 <b>which</b><ul compact><li>The <b>which</b> parameter is the message value for which configuration
is being checked.</ul>
 <b>onoffp</b><ul compact><li>The <b>onoffp</b> parameter references memory into which
 the configuration of the specified <b>which</b> parameter is copied.</ul> If the returned <b>onoff</b> value is zero, the parameter is off;
otherwise on.
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../../db4-devel-4.7.25/api_cxx/env_class.html">DbEnv</a>
<br><b>See Also</b>
<a href="../../db4-devel-4.7.25/api_cxx/rep_list.html">Replication and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../../db4-devel-4.7.25/api_cxx/api_core.html"><img src="../../db4-devel-4.7.25/images/api.gif" alt="API"></a><a href="../../db4-devel-4.7.25/ref/toc.html"><img src="../../db4-devel-4.7.25/images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
</body>
</html>

Copyright 2K16 - 2K18 Indonesian Hacker Rulez