2
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
4
<!--See the file LICENSE for redistribution information.-->
7
<title>Berkeley DB: DbEnv</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++">
12
<a name="2"><!--meow--></a>
13
<table width="100%"><tr valign=top>
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>
23
import com.sleepycat.db.*;
25
public class DbEnv extends Object
27
public DbEnv(int flags) throws DbException;
32
<p>The DbEnv object is the handle for a Berkeley DB environment -- a
33
collection including support for some or all of caching, locking,
34
logging and transaction subsystems, as well as databases and log files.
35
Methods off the DbEnv handle are used to configure the
36
environment as well as to operate on subsystems and databases in the
38
<p>DbEnv handles are free-threaded if the <a href="../api_java/env_open.html#DB_THREAD">Db.DB_THREAD</a> flag
39
is specified to the <a href="../api_java/env_open.html">DbEnv.open</a> method when the environment is opened.
40
The DbEnv handle should not be closed while any other handle
41
remains open that is using it as a reference (for example, <a href="../api_java/db_class.html">Db</a>
42
or <a href="../api_java/txn_class.html">DbTxn</a>). Once either the <a href="../api_java/env_close.html">DbEnv.close</a> or
43
<a href="../api_java/env_remove.html">DbEnv.remove</a> methods are called, the handle may not be accessed again,
44
regardless of the method's return.
45
<p>The constructor creates the DbEnv object. The constructor
46
allocates memory internally; calling the <a href="../api_java/env_close.html">DbEnv.close</a> or
47
<a href="../api_java/env_remove.html">DbEnv.remove</a> methods will free that memory.
48
<p>The following <b>flags</b> value may be specified:
50
<p><dt><a name="Db.DB_CLIENT">Db.DB_CLIENT</a><dd>Create a client environment to connect to a server.
51
<p>The Db.DB_CLIENT flag indicates to the system that this environment
52
is remote on a server. The use of this flag causes the environment
53
methods to use functions that call a server instead of local functions.
54
Prior to making any environment or database method calls, the
55
application must call the <a href="../api_java/env_set_rpc_server.html">DbEnv.set_rpc_server</a> method to
56
establish the connection to the server.
61
<a href="../api_java/env_list.html">Database Environments and Related Methods</a>
63
<table width="100%"><tr><td><br></td><td align=right>
64
<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>
66
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>