~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to libdb/docs/api_java/db_set_cachesize.html

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!--$Id$-->
2
 
<!--$Id$-->
3
 
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
4
 
<!--All rights reserved.-->
5
 
<!--See the file LICENSE for redistribution information.-->
6
 
<html>
7
 
<head>
8
 
<title>Berkeley DB: Db.set_cachesize</title>
9
 
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
10
 
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
11
 
</head>
12
 
<body bgcolor=white>
13
 
<a name="2"><!--meow--></a>
14
 
<table width="100%"><tr valign=top>
15
 
<td>
16
 
<h1>Db.set_cachesize</h1>
17
 
</td>
18
 
<td align=right>
19
 
<a href="../api_java/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
20
 
</td></tr></table>
21
 
<hr size=1 noshade>
22
 
<tt>
23
 
<h3><pre>
24
 
import com.sleepycat.db.*;
25
 
<p>
26
 
public void set_cachesize(int gbytes, int bytes, int ncache)
27
 
    throws DbException;
28
 
</pre></h3>
29
 
<h1>Description</h1>
30
 
<p>Set the size of the shared memory buffer pool -- that is, the cache --
31
 
to <b>gbytes</b> gigabytes plus <b>bytes</b>.  The cache should be
32
 
the size of the normal working data set of the application, with some
33
 
small amount of additional memory for unusual situations.  (Note: the
34
 
working set is not the same as the number of pages accessed
35
 
simultaneously, and should be quite a bit larger!)
36
 
<p>The default cache size is 256KB, and may not be specified as less than
37
 
20KB.  Any cache size less than 500MB is automatically increased by 25%
38
 
to account for buffer pool overhead; cache sizes larger than 500MB are
39
 
used as specified.  The current maximum size of a single cache is 4GB.
40
 
For information on tuning the Berkeley DB cache size, see
41
 
<a href="../ref/am_conf/cachesize.html">Selecting a cache size</a>.
42
 
<p>It is possible to specify caches to Berkeley DB that are large enough so that
43
 
they cannot be allocated contiguously on some architectures.  For
44
 
example, some releases of Solaris limit the amount of memory that may
45
 
be allocated contiguously by a process.  If <b>ncache</b> is 0 or 1,
46
 
the cache will be allocated contiguously in memory.  If it is greater
47
 
than 1, the cache will be broken up into <b>ncache</b> equally sized,
48
 
separate pieces of memory.
49
 
<p>Because databases opened within Berkeley DB environments use the cache
50
 
specified to the environment, it is an error to attempt to set a cache
51
 
in a database created within an environment.
52
 
<p>The Db.set_cachesize interface may not be called after the <a href="../api_java/db_open.html">Db.open</a>
53
 
interface is called.
54
 
<p>The Db.set_cachesize method throws an exception that encapsulates a non-zero error value on
55
 
failure.
56
 
<p>The database environment's cache size may also be set using the environment's
57
 
<b>DB_CONFIG</b> file.  The syntax of the entry in that file is a
58
 
single line with the string "set_cachesize", one or more whitespace characters,
59
 
and the three arguments specified to this interface, separated by whitespace
60
 
characters, for example, "set_cachesize 1 500 2".  Because the <b>DB_CONFIG</b> file is read when the database
61
 
environment is opened, it will silently overrule configuration done
62
 
before that time.
63
 
<h1>Errors</h1>
64
 
<p>The Db.set_cachesize method may fail and throw an exception encapsulating a non-zero error for the following conditions:
65
 
<p><dl compact>
66
 
<p><dt>EINVAL<dd>An invalid flag value or parameter was specified.
67
 
<p>The specified cache size was impossibly small.
68
 
<p>Called in a database environment.
69
 
<p>Called after
70
 
<a href="../api_java/db_open.html">Db.open</a>
71
 
was called.
72
 
</dl>
73
 
<p>The Db.set_cachesize method may fail and throw an exception for errors specified for other Berkeley DB and C library or system methods.
74
 
If a catastrophic error has occurred, the Db.set_cachesize method may fail and
75
 
throw a <a href="../api_java/runrec_class.html">DbRunRecoveryException</a>,
76
 
in which case all subsequent Berkeley DB calls will fail in the same way.
77
 
<h1>Class</h1>
78
 
<a href="../api_java/db_class.html">Db</a>
79
 
<h1>See Also</h1>
80
 
<a href="../api_java/db_list.html">Databases and Related Methods</a>
81
 
</tt>
82
 
<table width="100%"><tr><td><br></td><td align=right>
83
 
<a href="../api_java/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
84
 
</td></tr></table>
85
 
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
86
 
</body>
87
 
</html>