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: DbSequence::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>DbSequence::set_cachesize</b> 14</td> 15<td align=right> 16<a href="../api_cxx/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 <db_cxx.h> 23<p> 24int 25DbSequence::set_cachesize(int32_t size); 26<p> 27int DbSequence::get_cachesize(*sizep); 28</pre></b> 29<hr size=1 noshade> 30<b>Description: DbSequence::set_cachesize</b> 31<p>Configure the number of elements cached by a sequence handle.</p> 32<p>The DbSequence::set_cachesize method may not be called after the 33<a href="../api_cxx/seq_open.html">DbSequence::open</a> method is called.</p> 34<p>The DbSequence::set_cachesize method 35either returns a non-zero error value 36or throws an exception that encapsulates a non-zero error value on 37failure, and returns 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 DbSequence::set_cachesize method 44may fail and throw 45<a href="../api_cxx/except_class.html">DbException</a>, 46encapsulating one of the following non-zero errors, or return one of 47the following non-zero errors:</p> 48<br> 49<b>EINVAL</b><ul compact><li>An 50invalid flag value or parameter was specified.</ul> 51<br> 52<hr size=1 noshade> 53<b>Description: DbSequence::get_cachesize</b> 54<p>The DbSequence::get_cachesize method returns the current cache size.</p> 55<p>The DbSequence::get_cachesize method may be called at any time during the life of the 56application.</p> 57<p>The DbSequence::get_cachesize method 58either returns a non-zero error value 59or throws an exception that encapsulates a non-zero error value on 60failure, and returns 0 on success. 61</p> 62<b>Parameters</b> <br> 63 <b>sizep</b><ul compact><li>The DbSequence::get_cachesize method returns the 64current cache size in <b>sizep</b>.</ul> 65<br> 66<hr size=1 noshade> 67<br><b>Class</b> 68<a href="../api_cxx/seq_class.html">DbSequence</a> 69<br><b>See Also</b> 70<a href="../api_cxx/seq_list.html">Sequences and Related Methods</a> 71</tt> 72<table width="100%"><tr><td><br></td><td align=right> 73<a href="../api_cxx/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a> 74</td></tr></table> 75<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 76</body> 77</html> 78