Imported Upstream version 5.3.21
[platform/upstream/libdb.git] / docs / api_reference / CXX / dbset_q_extentsize.html
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 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">Db::set_q_extentsize()</th>
22         </tr>
23         <tr>
24           <td width="20%" align="left"><a accesskey="p" href="dbset_priority.html">Prev</a> </td>
25           <th width="60%" align="center">Chapter 2. 
26                 The Db Handle
27         </th>
28           <td width="20%" align="right"> <a accesskey="n" href="dbset_re_delim.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="dbset_q_extentsize"></a>Db::set_q_extentsize()</h2>
38           </div>
39         </div>
40       </div>
41       <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 int
44 Db::set_q_extentsize(u_int32_t extentsize); </pre>
45       <p>
46          Set the size of the extents used to hold pages in a Queue database,
47          specified as a number of pages.  Each extent is created as a separate
48          physical file.  If no extent size is set, the default behavior is to
49          create only a single underlying database file.
50     </p>
51       <p>
52          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>.
53     </p>
54       <p>
55          The <code class="methodname">Db::set_q_extentsize()</code> method configures a database, not only
56          operations performed using the specified <a class="link" href="db.html" title="Chapter 2.  The Db Handle">Db</a>  
57          handle.
58     </p>
59       <p>
60          The <code class="methodname">Db::set_q_extentsize()</code> method may not be called after the 
61          <a class="xref" href="dbopen.html" title="Db::open()">Db::open()</a>  method is called. If
62          the database already exists when 
63          <a class="xref" href="dbopen.html" title="Db::open()">Db::open()</a>  is called, the
64          information specified to <code class="methodname">Db::set_q_extentsize()</code> will be ignored.
65     </p>
66       <p>
67          The <code class="methodname">Db::set_q_extentsize()</code> <span>
68             
69             <span>
70                 method either returns a non-zero error value or throws an
71                 exception that encapsulates a non-zero error value on
72                 failure, and returns 0 on success.
73             </span>
74         </span>
75     </p>
76       <div class="sect2" lang="en" xml:lang="en">
77         <div class="titlepage">
78           <div>
79             <div>
80               <h3 class="title"><a id="idp440232"></a>Parameters</h3>
81             </div>
82           </div>
83         </div>
84         <div class="sect3" lang="en" xml:lang="en">
85           <div class="titlepage">
86             <div>
87               <div>
88                 <h4 class="title"><a id="idp451352"></a>extentsize</h4>
89               </div>
90             </div>
91           </div>
92           <p>
93                           The <span class="bold"><strong>extentsize</strong></span> parameter is the
94                           number of pages in a Queue database extent.
95                      </p>
96         </div>
97       </div>
98       <div class="sect2" lang="en" xml:lang="en">
99         <div class="titlepage">
100           <div>
101             <div>
102               <h3 class="title"><a id="idp436720"></a>Errors</h3>
103             </div>
104           </div>
105         </div>
106         <p>
107                          The <code class="methodname">Db::set_q_extentsize()</code> <span>
108             
109             <span>
110                 method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a> 
111                 exception, encapsulating one of the following non-zero errors, or return one
112                 of the following non-zero errors:
113             </span>
114         </span>
115                     </p>
116         <div class="sect3" lang="en" xml:lang="en">
117           <div class="titlepage">
118             <div>
119               <div>
120                 <h4 class="title"><a id="idp456000"></a>EINVAL</h4>
121               </div>
122             </div>
123           </div>
124           <p>
125                 If the method was called after <a class="xref" href="dbopen.html" title="Db::open()">Db::open()</a> 
126                 was called; or if an invalid flag value or parameter was specified.
127             </p>
128         </div>
129       </div>
130       <div class="sect2" lang="en" xml:lang="en">
131         <div class="titlepage">
132           <div>
133             <div>
134               <h3 class="title"><a id="idp435552"></a>Class</h3>
135             </div>
136           </div>
137         </div>
138         <p>
139                 <a class="link" href="db.html" title="Chapter 2.  The Db Handle">Db</a>  
140             </p>
141       </div>
142       <div class="sect2" lang="en" xml:lang="en">
143         <div class="titlepage">
144           <div>
145             <div>
146               <h3 class="title"><a id="idp441776"></a>See Also</h3>
147             </div>
148           </div>
149         </div>
150         <p>
151                      <a class="xref" href="db.html#dblist" title="Database and Related Methods">Database and Related Methods</a> 
152                 </p>
153       </div>
154     </div>
155     <div class="navfooter">
156       <hr />
157       <table width="100%" summary="Navigation footer">
158         <tr>
159           <td width="40%" align="left"><a accesskey="p" href="dbset_priority.html">Prev</a> </td>
160           <td width="20%" align="center">
161             <a accesskey="u" href="db.html">Up</a>
162           </td>
163           <td width="40%" align="right"> <a accesskey="n" href="dbset_re_delim.html">Next</a></td>
164         </tr>
165         <tr>
166           <td width="40%" align="left" valign="top">Db::set_priority() </td>
167           <td width="20%" align="center">
168             <a accesskey="h" href="index.html">Home</a>
169           </td>
170           <td width="40%" align="right" valign="top"> Db::set_re_delim()</td>
171         </tr>
172       </table>
173     </div>
174   </body>
175 </html>