Debian Codegraph @

docs/api_reference/CXX/repmgr_site_by_eid.html

raw
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>DbEnv::repmgr_site_by_eid()</title>
7 <link rel="stylesheet" href="apiReference.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Berkeley DB C++ API Reference" />
10 <link rel="up" href="rep.html" title="Chapter 11.  Replication Methods" />
11 <link rel="prev" href="repmgr_site.html" title="DbEnv::repmgr_site()" />
12 <link rel="next" href="repmgrsite_list.html" title="DbEnv::repmgr_site_list()" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">DbEnv::repmgr_site_by_eid()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="repmgr_site.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 11. 
26 Replication Methods
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="repmgrsite_list.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="repmgr_site_by_eid"></a>DbEnv::repmgr_site_by_eid()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 int
44 DbEnv::repmgr_site_by_eid(int eid, DB_SITE **sitep </pre>
45 <p>
46 The <code class="methodname">DbEnv::repmgr_site_by_eid()</code> method returns a
47 DbSite handle based on the site's Environment ID
48 value. You use the DbSite
49 handle to configure and manage replication sites.
50 </p>
51 <p>
52 This method allocates memory for the handle, returning a pointer to
53 the structure in the memory to which
54 <span class="bold"><strong>sitep</strong></span> refers. To release the
55 allocated memory and discard the handle, call the
56 <a class="xref" href="dbsite_close.html" title="DbSite::close()">DbSite::close()</a>
57 method.
58 </p>
59 <p>
60 The <code class="methodname">DbEnv::repmgr_site_by_eid()</code> method may
61 be called at any time after environment open time.
62 </p>
63 <p>
64 The <code class="methodname">DbEnv::repmgr_site_by_eid()</code> <span>
65
66 <span>
67 method either returns a non-zero error value or throws an
68 exception that encapsulates a non-zero error value on
69 failure, and returns 0 on success.
70 </span>
71 </span>
72 </p>
73 <div class="sect2" lang="en" xml:lang="en">
74 <div class="titlepage">
75 <div>
76 <div>
77 <h3 class="title"><a id="idp9929776"></a>Parameters</h3>
78 </div>
79 </div>
80 </div>
81 <div class="sect3" lang="en" xml:lang="en">
82 <div class="titlepage">
83 <div>
84 <div>
85 <h4 class="title"><a id="idp9929128"></a>eid</h4>
86 </div>
87 </div>
88 </div>
89 <p>
90 The Environment ID of the site for which you want
91 to create the DbSite handle. You can obtain a
92 site's EID by using the
93 <a class="xref" href="dbsite_get_eid.html" title="DbSite::get_eid()">DbSite::get_eid()</a>
94 method.
95 </p>
96 </div>
97 <div class="sect3" lang="en" xml:lang="en">
98 <div class="titlepage">
99 <div>
100 <div>
101 <h4 class="title"><a id="idp9909488"></a>sitep</h4>
102 </div>
103 </div>
104 </div>
105 <p>
106 References memory into which a pointer
107 to the allocated handle is copied.
108 </p>
109 </div>
110 </div>
111 <div class="sect2" lang="en" xml:lang="en">
112 <div class="titlepage">
113 <div>
114 <div>
115 <h3 class="title"><a id="idp9900200"></a>Errors</h3>
116 </div>
117 </div>
118 </div>
119 <p>
120 The <code class="methodname">DbEnv::repmgr_site()</code>
121 <span>
122
123 <span>
124 method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a>
125 exception, encapsulating one of the following non-zero errors, or return one
126 of the following non-zero errors:
127 </span>
128 </span>
129 </p>
130 <div class="sect3" lang="en" xml:lang="en">
131 <div class="titlepage">
132 <div>
133 <div>
134 <h4 class="title"><a id="idp9935968"></a>EINVAL</h4>
135 </div>
136 </div>
137 </div>
138 <p>
139 If this method is called from a Base API application,
140 or if an invalid flag value or parameter was specified.
141 </p>
142 </div>
143 </div>
144 <div class="sect2" lang="en" xml:lang="en">
145 <div class="titlepage">
146 <div>
147 <div>
148 <h3 class="title"><a id="idp9934888"></a>Class</h3>
149 </div>
150 </div>
151 </div>
152 <p>
153 <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>
154 </p>
155 </div>
156 <div class="sect2" lang="en" xml:lang="en">
157 <div class="titlepage">
158 <div>
159 <div>
160 <h3 class="title"><a id="idp9937264"></a>See Also</h3>
161 </div>
162 </div>
163 </div>
164 <p>
165 <a class="xref" href="rep.html#replist" title="Replication and Related Methods">Replication and Related Methods</a>
166 </p>
167 </div>
168 </div>
169 <div class="navfooter">
170 <hr />
171 <table width="100%" summary="Navigation footer">
172 <tr>
173 <td width="40%" align="left"><a accesskey="p" href="repmgr_site.html">Prev</a> </td>
174 <td width="20%" align="center">
175 <a accesskey="u" href="rep.html">Up</a>
176 </td>
177 <td width="40%" align="right"> <a accesskey="n" href="repmgrsite_list.html">Next</a></td>
178 </tr>
179 <tr>
180 <td width="40%" align="left" valign="top">DbEnv::repmgr_site() </td>
181 <td width="20%" align="center">
182 <a accesskey="h" href="index.html">Home</a>
183 </td>
184 <td width="40%" align="right" valign="top"> DbEnv::repmgr_site_list()</td>
185 </tr>
186 </table>
187 </div>
188 </body>
189 </html>