1
<!--Copyright 1999-2002 by Sleepycat Software, Inc.-->
2
<!--All rights reserved.-->
5
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
<title>Replication commands</title>
11
<a NAME="Replication Commands"></a>Replication Commands</h2>
12
Replication commands are invoked from the environment handle, after
13
it has been opened with the appropriate flags defined
14
<a href="./env.html">here</a>.<br>
16
<p><b>> <env> rep_process_message <i>machid</i> <i>control</i>
18
<p>This command processes a single incoming replication message. It
19
is a direct translation of the <a
20
href="../../docs/api_c/rep_process_message.html">rep_process_message</a>
22
It returns either a 0 (for success), a DB error message or it throws a
23
Tcl error with a system message. The arguments are:
26
<b>machid </b>is the machine ID of the machine that <i>sent</i> this
30
<b>control</b> is a binary string containing the exact contents of the
31
<b><i>control</i></b> argument to the <b><i>sendproc</i></b> function
32
that was passed this message on another site.</li>
35
<b>rec</b> is a binary string containing the exact contents of the
36
<b><i>rec</i></b> argument to the <b><i>sendproc</i></b> function
37
that was passed this message on another site.</li>
41
<br><b>> <env> rep_elect <i>nsites</i> <i>pri</i> <i>wait</i>
43
<p>This command causes a replication election. It is a direct translation
44
of the <a href="../../docs/api_c/rep_elect.html">rep_elect</a> function.
45
Its arguments, all integers, correspond exactly to that C function's
47
It will return a list containing two integers, which contain,
48
respectively, the integer values returned in the C function's
49
<i><b>midp</b></i> and <i><b>selfp</b></i> parameters.