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">
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()" />
15 <div xmlns="" class="navheader">
17 <p>Library Version 11.2.5.3</p>
19 <table width="100%" summary="Navigation header">
21 <th colspan="3" align="center">Db::set_q_extentsize()</th>
24 <td width="20%" align="left"><a accesskey="p" href="dbset_priority.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 2.
28 <td width="20%" align="right"> <a accesskey="n" href="dbset_re_delim.html">Next</a></td>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
37 <h2 class="title" style="clear: both"><a id="dbset_q_extentsize"></a>Db::set_q_extentsize()</h2>
41 <pre class="programlisting">#include <db_cxx.h>
44 Db::set_q_extentsize(u_int32_t extentsize); </pre>
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.
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>.
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>
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.
67 The <code class="methodname">Db::set_q_extentsize()</code> <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.
76 <div class="sect2" lang="en" xml:lang="en">
77 <div class="titlepage">
80 <h3 class="title"><a id="idp440232"></a>Parameters</h3>
84 <div class="sect3" lang="en" xml:lang="en">
85 <div class="titlepage">
88 <h4 class="title"><a id="idp451352"></a>extentsize</h4>
93 The <span class="bold"><strong>extentsize</strong></span> parameter is the
94 number of pages in a Queue database extent.
98 <div class="sect2" lang="en" xml:lang="en">
99 <div class="titlepage">
102 <h3 class="title"><a id="idp436720"></a>Errors</h3>
107 The <code class="methodname">Db::set_q_extentsize()</code> <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:
116 <div class="sect3" lang="en" xml:lang="en">
117 <div class="titlepage">
120 <h4 class="title"><a id="idp456000"></a>EINVAL</h4>
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.
130 <div class="sect2" lang="en" xml:lang="en">
131 <div class="titlepage">
134 <h3 class="title"><a id="idp435552"></a>Class</h3>
139 <a class="link" href="db.html" title="Chapter 2. The Db Handle">Db</a>
142 <div class="sect2" lang="en" xml:lang="en">
143 <div class="titlepage">
146 <h3 class="title"><a id="idp441776"></a>See Also</h3>
151 <a class="xref" href="db.html#dblist" title="Database and Related Methods">Database and Related Methods</a>
155 <div class="navfooter">
157 <table width="100%" summary="Navigation footer">
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>
163 <td width="40%" align="right"> <a accesskey="n" href="dbset_re_delim.html">Next</a></td>
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>
170 <td width="40%" align="right" valign="top"> Db::set_re_delim()</td>