1<!--$Id: seq_set_cachesize.so,v 1.8 2004/09/07 15:37:41 bostic Exp $-->
2<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
3<!--See the file LICENSE for redistribution information.-->
4<html>
5<head>
6<title>Berkeley DB: DB_SEQUENCE-&gt;set_cachesize</title>
7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
9</head>
10<body bgcolor=white>
11<table width="100%"><tr valign=top>
12<td>
13<b>DB_SEQUENCE-&gt;set_cachesize</b>
14</td>
15<td align=right>
16<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
17<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
18</tr></table>
19<hr size=1 noshade>
20<tt>
21<b><pre>
22#include &lt;db.h&gt;
23<p>
24int
25DB_SEQUENCE-&gt;set_cachesize(DB_SEQUENCE *seq, int32_t size);
26<p>
27int
28DB_SEQUENCE-&gt;get_cachesize(DB_SEQUENCE *seq, int32_t *sizep);
29</pre></b>
30<hr size=1 noshade>
31<b>Description: DB_SEQUENCE-&gt;set_cachesize</b>
32<p>Configure the number of elements cached by a sequence handle.</p>
33<p>The DB_SEQUENCE-&gt;set_cachesize method may not be called after the
34<a href="../api_c/seq_open.html">DB_SEQUENCE-&gt;open</a> method is called.</p>
35<p>The DB_SEQUENCE-&gt;set_cachesize method
36returns a non-zero error value on failure
37and 0 on success.
38</p>
39<b>Parameters</b> <br>
40 <b>size</b><ul compact><li>The number of elements in the cache.</ul>
41<br>
42<br><b>Errors</b>
43<p>The DB_SEQUENCE-&gt;set_cachesize method
44may fail and return one of the following non-zero errors:</p>
45<br>
46<b>EINVAL</b><ul compact><li>An
47invalid flag value or parameter was specified.</ul>
48<br>
49<hr size=1 noshade>
50<b>Description: DB_SEQUENCE-&gt;get_cachesize</b>
51<p>The DB_SEQUENCE-&gt;get_cachesize method returns the current cache size.</p>
52<p>The DB_SEQUENCE-&gt;get_cachesize method may be called at any time during the life of the
53application.</p>
54<p>The DB_SEQUENCE-&gt;get_cachesize method
55returns a non-zero error value on failure
56and 0 on success.
57</p>
58<b>Parameters</b> <br>
59 <b>sizep</b><ul compact><li>The DB_SEQUENCE-&gt;get_cachesize method returns  the
60current cache size in <b>sizep</b>.</ul>
61<br>
62<hr size=1 noshade>
63<br><b>Class</b>
64<a href="../api_c/seq_class.html">DB_SEQUENCE</a>
65<br><b>See Also</b>
66<a href="../api_c/seq_list.html">Sequences and Related Methods</a>
67</tt>
68<table width="100%"><tr><td><br></td><td align=right>
69<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
70</td></tr></table>
71<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
72</body>
73</html>
74