~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_h_nelem.html

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.10.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 128.
  • Revision ID: james.westby@ubuntu.com-20100517170206-xu1wmjuy40nt2sk0
Tags: upstream-2.30.1
ImportĀ upstreamĀ versionĀ 2.30.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!--$Id$-->
2
 
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
3
 
<!--All rights reserved.-->
4
 
<!--See the file LICENSE for redistribution information.-->
5
 
<html>
6
 
<head>
7
 
<title>Berkeley DB: Db.set_h_nelem</title>
8
 
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
9
 
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
10
 
</head>
11
 
<body bgcolor=white>
12
 
<a name="2"><!--meow--></a>
13
 
<table width="100%"><tr valign=top>
14
 
<td>
15
 
<h1>Db.set_h_nelem</h1>
16
 
</td>
17
 
<td align=right>
18
 
<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>
19
 
</td></tr></table>
20
 
<hr size=1 noshade>
21
 
<tt>
22
 
<h3><pre>
23
 
import com.sleepycat.db.*;
24
 
<p>
25
 
public void set_h_nelem(int h_nelem)
26
 
    throws DbException;
27
 
</pre></h3>
28
 
<h1>Description</h1>
29
 
<p>Set an estimate of the final size of the hash table.
30
 
<p>In order for the estimate to be used when creating the database,
31
 
the <a href="../api_java/db_set_h_ffactor.html">Db.set_h_ffactor</a> method must also be called.
32
 
If the estimate or fill factor are not set or are set too low,
33
 
hash tables will still expand gracefully
34
 
as keys are entered, although a slight performance degradation may be
35
 
noticed.
36
 
<p>The Db.set_h_nelem method configures a database, not only operations performed
37
 
using the specified <a href="../api_java/db_class.html">Db</a> handle.
38
 
<p>The Db.set_h_nelem interface may not be called after the <a href="../api_java/db_open.html">Db.open</a>
39
 
interface is called.
40
 
If the database already exists when
41
 
<a href="../api_java/db_open.html">Db.open</a> is called, the information specified to Db.set_h_nelem will
42
 
be ignored.
43
 
<p>The Db.set_h_nelem method throws an exception that encapsulates a non-zero error value on
44
 
failure.
45
 
<h1>Errors</h1>
46
 
<p>The Db.set_h_nelem method may fail and throw an exception encapsulating a non-zero error for the following conditions:
47
 
<p><dl compact>
48
 
<p><dt>EINVAL<dd>An invalid flag value or parameter was specified.
49
 
<p>Called after <a href="../api_java/db_open.html">Db.open</a> was called.
50
 
</dl>
51
 
<p>The Db.set_h_nelem method may fail and throw an exception for errors specified for other Berkeley DB and C library or system methods.
52
 
If a catastrophic error has occurred, the Db.set_h_nelem method may fail and
53
 
throw a <a href="../api_java/runrec_class.html">DbRunRecoveryException</a>,
54
 
in which case all subsequent Berkeley DB calls will fail in the same way.
55
 
<h1>Class</h1>
56
 
<a href="../api_java/db_class.html">Db</a>
57
 
<h1>See Also</h1>
58
 
<a href="../api_java/db_list.html">Databases and Related Methods</a>
59
 
</tt>
60
 
<table width="100%"><tr><td><br></td><td align=right>
61
 
<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>
62
 
</td></tr></table>
63
 
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
64
 
</body>
65
 
</html>