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>DbSequence::set_cachesize()</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="seq.html" title="Chapter 12. The DbSequence Handle" /> 11 <link rel="prev" href="seqremove.html" title="DbSequence::remove()" /> 12 <link rel="next" href="seqset_flags.html" title="DbSequence::set_flags()" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">DbSequence::set_cachesize()</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="seqremove.html">Prev</a> </td> 22 <th width="60%" align="center">Chapter 12. 23 The DbSequence Handle 24 </th> 25 <td width="20%" align="right"> <a accesskey="n" href="seqset_flags.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="seqset_cachesize"></a>DbSequence::set_cachesize()</h2> 35 </div> 36 </div> 37 </div> 38 <pre class="programlisting">#include <db_cxx.h> 39 40int 41DbSequence::set_cachesize(int32_t size); </pre> 42 <p> 43 Configure the number of elements cached by a sequence handle. 44 </p> 45 <p> 46 The <code class="methodname">DbSequence::set_cachesize()</code> method may not be called after the 47 <a class="xref" href="seqopen.html" title="DbSequence::open()">DbSequence::open()</a> 48 method is called. 49 </p> 50 <p> 51 The <code class="methodname">DbSequence::set_cachesize()</code> <span> 52 53 <span> 54 method either returns a non-zero error value or throws an 55 exception that encapsulates a non-zero error value on 56 failure, and returns 0 on success. 57 </span> 58 </span> 59 </p> 60 <div class="sect2" lang="en" xml:lang="en"> 61 <div class="titlepage"> 62 <div> 63 <div> 64 <h3 class="title"><a id="id1710734"></a>Parameters</h3> 65 </div> 66 </div> 67 </div> 68 <div class="sect3" lang="en" xml:lang="en"> 69 <div class="titlepage"> 70 <div> 71 <div> 72 <h4 class="title"><a id="id1710568"></a>size</h4> 73 </div> 74 </div> 75 </div> 76 <p> 77 The number of elements in the cache. 78 </p> 79 </div> 80 </div> 81 <div class="sect2" lang="en" xml:lang="en"> 82 <div class="titlepage"> 83 <div> 84 <div> 85 <h3 class="title"><a id="id1711011"></a>Errors</h3> 86 </div> 87 </div> 88 </div> 89 <p> 90 The <code class="methodname">DbSequence::set_cachesize()</code> <span> 91 92 <span> 93 method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a> 94 exception, encapsulating one of the following non-zero errors, or return one 95 of the following non-zero errors: 96 </span> 97 </span> 98 </p> 99 <div class="sect3" lang="en" xml:lang="en"> 100 <div class="titlepage"> 101 <div> 102 <div> 103 <h4 class="title"><a id="id1711041"></a>EINVAL</h4> 104 </div> 105 </div> 106 </div> 107 <p> 108 An invalid flag value or parameter was specified. 109 </p> 110 </div> 111 </div> 112 <div class="sect2" lang="en" xml:lang="en"> 113 <div class="titlepage"> 114 <div> 115 <div> 116 <h3 class="title"><a id="id1711068"></a>Class</h3> 117 </div> 118 </div> 119 </div> 120 <p> 121 <a class="link" href="seq.html" title="Chapter 12. The DbSequence Handle">DbSequence</a> 122 </p> 123 </div> 124 <div class="sect2" lang="en" xml:lang="en"> 125 <div class="titlepage"> 126 <div> 127 <div> 128 <h3 class="title"><a id="id1711017"></a>See Also</h3> 129 </div> 130 </div> 131 </div> 132 <p> 133 <a class="xref" href="seq.html#seqlist" title="Sequences and Related Methods">Sequences and Related Methods</a> 134 </p> 135 </div> 136 </div> 137 <div class="navfooter"> 138 <hr /> 139 <table width="100%" summary="Navigation footer"> 140 <tr> 141 <td width="40%" align="left"><a accesskey="p" href="seqremove.html">Prev</a> </td> 142 <td width="20%" align="center"> 143 <a accesskey="u" href="seq.html">Up</a> 144 </td> 145 <td width="40%" align="right"> <a accesskey="n" href="seqset_flags.html">Next</a></td> 146 </tr> 147 <tr> 148 <td width="40%" align="left" valign="top">DbSequence::remove() </td> 149 <td width="20%" align="center"> 150 <a accesskey="h" href="index.html">Home</a> 151 </td> 152 <td width="40%" align="right" valign="top"> DbSequence::set_flags()</td> 153 </tr> 154 </table> 155 </div> 156 </body> 157</html> 158