env_class.html   [plain text]


<!--$Id: env_class.html,v 1.1 2003/02/15 04:55:51 zarzycki Exp $-->
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
<!--All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DbEnv</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
</head>
<body bgcolor=white>
<a name="2"><!--meow--></a>
<table width="100%"><tr valign=top>
<td>
<h1>DbEnv</h1>
</td>
<td align=right>
<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>
</td></tr></table>
<hr size=1 noshade>
<tt>
<h3><pre>
import com.sleepycat.db.*;
<p>
public class DbEnv extends Object
{
	public DbEnv(int flags) throws DbException;
	...
}
</pre></h3>
<h1>Description</h1>
<p>The DbEnv object is the handle for a Berkeley DB environment -- a
collection including support for some or all of caching, locking,
logging and transaction subsystems, as well as databases and log files.
Methods off the DbEnv handle are used to configure the
environment as well as to operate on subsystems and databases in the
environment.
<p>DbEnv handles are free-threaded if the <a href="../api_java/env_open.html#DB_THREAD">Db.DB_THREAD</a> flag
is specified to the <a href="../api_java/env_open.html">DbEnv.open</a> method when the environment is opened.
The DbEnv handle should not be closed while any other handle
remains open that is using it as a reference (for example, <a href="../api_java/db_class.html">Db</a>
or <a href="../api_java/txn_class.html">DbTxn</a>).  Once either the <a href="../api_java/env_close.html">DbEnv.close</a> or
<a href="../api_java/env_remove.html">DbEnv.remove</a> methods are called, the handle may not be accessed again,
regardless of the method's return.
<p>The constructor creates the DbEnv object.  The constructor
allocates memory internally; calling the <a href="../api_java/env_close.html">DbEnv.close</a> or
<a href="../api_java/env_remove.html">DbEnv.remove</a> methods will free that memory.
<p>The following <b>flags</b> value may be specified:
<p><dl compact>
<p><dt><a name="Db.DB_CLIENT">Db.DB_CLIENT</a><dd>Create a client environment to connect to a server.
<p>The Db.DB_CLIENT flag indicates to the system that this environment
is remote on a server.  The use of this flag causes the environment
methods to use functions that call a server instead of local functions.
Prior to making any environment or database method calls, the
application must call the <a href="../api_java/env_set_rpc_server.html">DbEnv.set_rpc_server</a> method to
establish the connection to the server.
</dl>
<h1>Class</h1>
DbEnv
<h1>See Also</h1>
<a href="../api_java/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<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>
</td></tr></table>
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
</body>
</html>