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