• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/db-4.8.30/docs/api_reference/CXX/
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>Db::set_q_extentsize()</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="db.html" title="Chapter 2.  The Db Handle" />
11    <link rel="prev" href="dbset_priority.html" title="Db::set_priority()" />
12    <link rel="next" href="dbset_re_delim.html" title="Db::set_re_delim()" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">Db::set_q_extentsize()</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="dbset_priority.html">Prev</a> </td>
22          <th width="60%" align="center">Chapter 2. 
23                The Db Handle
24        </th>
25          <td width="20%" align="right"> <a accesskey="n" href="dbset_re_delim.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="sect1" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title" style="clear: both"><a id="dbset_q_extentsize"></a>Db::set_q_extentsize()</h2>
35          </div>
36        </div>
37      </div>
38      <pre class="programlisting">#include &lt;db_cxx.h&gt;
39
40int
41Db::set_q_extentsize(u_int32_t extentsize); </pre>
42      <p>
43         Set the size of the extents used to hold pages in a Queue database,
44         specified as a number of pages.  Each extent is created as a separate
45         physical file.  If no extent size is set, the default behavior is to
46         create only a single underlying database file.
47    </p>
48      <p>
49         For information on tuning the extent size, see <a href="../../programmer_reference/rq_conf.html#am_conf_extentsize" class="olink">Selecting a extent size</a>.
50    </p>
51      <p>
52         The <code class="methodname">Db::set_q_extentsize()</code> method configures a database, not only
53         operations performed using the specified <a class="link" href="db.html" title="Chapter 2.  The Db Handle">Db</a>  
54         handle.
55    </p>
56      <p>
57         The <code class="methodname">Db::set_q_extentsize()</code> method may not be called after the 
58         <a class="xref" href="dbopen.html" title="Db::open()">Db::open()</a>  method is called. If
59         the database already exists when 
60         <a class="xref" href="dbopen.html" title="Db::open()">Db::open()</a>  is called, the
61         information specified to <code class="methodname">Db::set_q_extentsize()</code> will be ignored.
62    </p>
63      <p>
64         The <code class="methodname">Db::set_q_extentsize()</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="id1649806"></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="id1650581"></a>extentsize</h4>
86              </div>
87            </div>
88          </div>
89          <p>
90                          The <span class="bold"><strong>extentsize</strong></span> parameter is the
91                          number of pages in a Queue database extent.
92                     </p>
93        </div>
94      </div>
95      <div class="sect2" lang="en" xml:lang="en">
96        <div class="titlepage">
97          <div>
98            <div>
99              <h3 class="title"><a id="id1649337"></a>Errors</h3>
100            </div>
101          </div>
102        </div>
103        <p>
104                         The <code class="methodname">Db::set_q_extentsize()</code> <span>
105            
106            <span>
107                method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a> 
108                exception, encapsulating one of the following non-zero errors, or return one
109                of the following non-zero errors:
110            </span>
111        </span>
112                    </p>
113        <div class="sect3" lang="en" xml:lang="en">
114          <div class="titlepage">
115            <div>
116              <div>
117                <h4 class="title"><a id="id1650517"></a>EINVAL</h4>
118              </div>
119            </div>
120          </div>
121          <p>
122                If the method was called after <a class="xref" href="dbopen.html" title="Db::open()">Db::open()</a> 
123                was called; or if an invalid flag value or parameter was specified.
124            </p>
125        </div>
126      </div>
127      <div class="sect2" lang="en" xml:lang="en">
128        <div class="titlepage">
129          <div>
130            <div>
131              <h3 class="title"><a id="id1650518"></a>Class</h3>
132            </div>
133          </div>
134        </div>
135        <p>
136                <a class="link" href="db.html" title="Chapter 2.  The Db Handle">Db</a>  
137            </p>
138      </div>
139      <div class="sect2" lang="en" xml:lang="en">
140        <div class="titlepage">
141          <div>
142            <div>
143              <h3 class="title"><a id="id1650785"></a>See Also</h3>
144            </div>
145          </div>
146        </div>
147        <p>
148                     <a class="xref" href="db.html#dblist" title="Database and Related Methods">Database and Related Methods</a> 
149                </p>
150      </div>
151    </div>
152    <div class="navfooter">
153      <hr />
154      <table width="100%" summary="Navigation footer">
155        <tr>
156          <td width="40%" align="left"><a accesskey="p" href="dbset_priority.html">Prev</a> </td>
157          <td width="20%" align="center">
158            <a accesskey="u" href="db.html">Up</a>
159          </td>
160          <td width="40%" align="right"> <a accesskey="n" href="dbset_re_delim.html">Next</a></td>
161        </tr>
162        <tr>
163          <td width="40%" align="left" valign="top">Db::set_priority() </td>
164          <td width="20%" align="center">
165            <a accesskey="h" href="index.html">Home</a>
166          </td>
167          <td width="40%" align="right" valign="top"> Db::set_re_delim()</td>
168        </tr>
169      </table>
170    </div>
171  </body>
172</html>
173