libdb/docs/api_reference/CXX/env.html

354 lines
17 KiB
HTML
Raw Normal View History

2011-09-13 17:44:24 +00:00
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Chapter 5.  The DbEnv Handle</title>
<link rel="stylesheet" href="apiReference.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
<link rel="start" href="index.html" title="Berkeley DB C++ API Reference" />
<link rel="up" href="index.html" title="Berkeley DB C++ API Reference" />
<link rel="prev" href="dbmultiplerecnodatabuilder.html" title="DbMultipleRecnoDataBuilder" />
<link rel="next" href="dbgetenv.html" title="Db::get_env()" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
<p>Library Version 11.2.5.2</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center">Chapter 5. 
The DbEnv Handle
</th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="dbmultiplerecnodatabuilder.html">Prev</a> </td>
<th width="60%" align="center"> </th>
<td width="20%" align="right"> <a accesskey="n" href="dbgetenv.html">Next</a></td>
</tr>
</table>
<hr />
</div>
<div class="chapter" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a id="env"></a>Chapter 5. 
The DbEnv Handle
</h2>
</div>
</div>
</div>
<p>
The <code class="classname">DbEnv</code> 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 of the
<code class="classname">DbEnv</code> handle are used to configure the environment as well as
to operate on subsystems and databases in the environment.
</p>
<p>
<code class="classname">DbEnv</code> handles
are opened using the <a class="xref" href="envopen.html" title="DbEnv::open()">DbEnv::open()</a>
method.
</p>
<p>
When you are done using your environment, close it using the
<a class="xref" href="envclose.html" title="DbEnv::close()">DbEnv::close()</a> method. Before closing your
environment, make sure all open database handles are closed first. See the
<a class="xref" href="dbclose.html" title="Db::close()">Db::close()</a> method for more information.
</p>
<div class="sect1" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a id="envlist"></a>Database Environments and Related Methods</h2>
</div>
</div>
</div>
<div class="navtable">
<table border="1" width="80%">
<thead>
<tr>
<th>Database Environment Operations</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a class="xref" href="dbgetenv.html" title="Db::get_env()">Db::get_env()</a>
</td>
<td>Return the Db's underlying DbEnv handle </td>
</tr>
<tr>
<td>
<a class="xref" href="envclose.html" title="DbEnv::close()">DbEnv::close()</a>
</td>
<td>Close an environment</td>
</tr>
<tr>
<td>
<a class="xref" href="envcreate.html" title="DbEnv">DbEnv</a>
</td>
<td>Create an environment handle</td>
</tr>
<tr>
<td>
<a class="xref" href="envdbremove.html" title="DbEnv::dbremove()">DbEnv::dbremove()</a>
</td>
<td>Remove a database</td>
</tr>
<tr>
<td>
<a class="xref" href="envdbrename.html" title="DbEnv::dbrename()">DbEnv::dbrename()</a>
</td>
<td>Rename a database</td>
</tr>
<tr>
<td>
<a class="xref" href="enverr.html" title="DbEnv::err()">DbEnv::err()</a>
</td>
<td>Error message</td>
</tr>
<tr>
<td>
<a class="xref" href="envfailchk.html" title="DbEnv::failchk()">DbEnv::failchk()</a>
</td>
<td>Check for thread failure</td>
</tr>
<tr>
<td>
<a class="xref" href="envfileid_reset.html" title="DbEnv::fileid_reset()">DbEnv::fileid_reset()</a>
</td>
<td>Reset database file IDs</td>
</tr>
<tr>
<td>
<a class="xref" href="envfullversion.html" title="DbEnv::full_version()">DbEnv::full_version()</a>
</td>
<td>Return full version information</td>
</tr>
<tr>
<td>
<a class="xref" href="envget_home.html" title="DbEnv::get_home()">DbEnv::get_home()</a>
</td>
<td>Return environment's home directory</td>
</tr>
<tr>
<td>
<a class="xref" href="envget_open_flags.html" title="DbEnv::get_open_flags()">DbEnv::get_open_flags()</a>
</td>
<td>Return flags with which the environment was opened</td>
</tr>
<tr>
<td>
<a class="xref" href="envlog_verify.html" title="DbEnv::log_verify()">DbEnv::log_verify()</a>
</td>
<td>Verify log files of an environment.</td>
</tr>
<tr>
<td>
<a class="xref" href="envlsn_reset.html" title="DbEnv::lsn_reset()">DbEnv::lsn_reset()</a>
</td>
<td>Reset database file LSNs</td>
</tr>
<tr>
<td>
<a class="xref" href="envopen.html" title="DbEnv::open()">DbEnv::open()</a>
</td>
<td>Open an environment</td>
</tr>
<tr>
<td>
<a class="xref" href="envremove.html" title="DbEnv::remove()">DbEnv::remove()</a>
</td>
<td>Remove an environment</td>
</tr>
<tr>
<td>
<a class="xref" href="envstat.html" title="DbEnv::stat_print()">DbEnv::stat_print()</a>
</td>
<td>Environment statistics</td>
</tr>
<tr>
<td>
<a class="xref" href="envstrerror.html" title="DbEnv::strerror()">DbEnv::strerror()</a>
</td>
<td>Error strings</td>
</tr>
<tr>
<td>
<a class="xref" href="envversion.html" title="DbEnv::version()">DbEnv::version()</a>
</td>
<td>Return version information</td>
</tr>
<tr>
<td colspan="2">
<span class="bold">
<strong>Environment Configuration</strong>
</span>
</td>
</tr>
<tr>
<td>
<a class="xref" href="envadd_data_dir.html" title="DbEnv::add_data_dir()">DbEnv::add_data_dir()</a>
</td>
<td>add an environment data directory</td>
</tr>
<tr>
<td>
<a class="xref" href="envset_alloc.html" title="DbEnv::set_alloc()">DbEnv::set_alloc()</a>
</td>
<td>Set local space allocation functions</td>
</tr>
<tr>
<td>
<a class="xref" href="envset_app_dispatch.html" title="DbEnv::set_app_dispatch()">DbEnv::set_app_dispatch()</a>
</td>
<td>Configure application recovery callback</td>
</tr>
<tr>
<td><a class="xref" href="envset_data_dir.html" title="DbEnv::set_data_dir()">DbEnv::set_data_dir()</a>, <a class="xref" href="envget_data_dirs.html" title="DbEnv::get_data_dirs()">DbEnv::get_data_dirs()</a></td>
<td>Set/get the environment data directory</td>
</tr>
<tr>
<td><a class="xref" href="envset_create_dir.html" title="DbEnv::set_create_dir()">DbEnv::set_create_dir()</a>, <a class="xref" href="envget_create_dir.html" title="DbEnv::get_create_dir()">DbEnv::get_create_dir()</a></td>
<td>add an environment data directory</td>
</tr>
<tr>
<td><a class="xref" href="envset_encrypt.html" title="DbEnv::set_encrypt()">DbEnv::set_encrypt()</a>, <a class="xref" href="envget_encrypt_flags.html" title="DbEnv::get_encrypt_flags()">DbEnv::get_encrypt_flags()</a></td>
<td>Set/get the environment cryptographic key</td>
</tr>
<tr>
<td>
<a class="xref" href="envevent_notify.html" title="DbEnv::set_event_notify()">DbEnv::set_event_notify()</a>
</td>
<td>Set event notification callback</td>
</tr>
<tr>
<td>
<a class="xref" href="envset_errcall.html" title="DbEnv::set_errcall()">DbEnv::set_errcall()</a>
</td>
<td>Set error message callbacks</td>
</tr>
<tr>
<td><a class="xref" href="envset_errfile.html" title="DbEnv::set_errfile()">DbEnv::set_errfile()</a>, <a class="xref" href="envget_errfile.html" title="DbEnv::get_errfile()">DbEnv::get_errfile()</a></td>
<td>Set/get error message FILE</td>
</tr>
<tr>
<td>
<a class="xref" href="envset_error_stream.html" title="DbEnv::set_error_stream()">DbEnv::set_error_stream()</a>
</td>
<td>Set C++ ostream used for error messages</td>
</tr>
<tr>
<td><a class="xref" href="envset_errpfx.html" title="DbEnv::set_errpfx()">DbEnv::set_errpfx()</a>, <a class="xref" href="envget_errpfx.html" title="DbEnv::get_errpfx()">DbEnv::get_errpfx()</a></td>
<td>Set/get error message prefix</td>
</tr>
<tr>
<td>
<a class="xref" href="envset_feedback.html" title="DbEnv::set_feedback()">DbEnv::set_feedback()</a>
</td>
<td>Set feedback callback</td>
</tr>
<tr>
<td><a class="xref" href="envset_flags.html" title="DbEnv::set_flags()">DbEnv::set_flags()</a>, <a class="xref" href="envget_flags.html" title="DbEnv::get_flags()">DbEnv::get_flags()</a></td>
<td>Environment configuration</td>
</tr>
<tr>
<td><a class="xref" href="envset_intermediate_dir_mode.html" title="DbEnv::set_intermediate_dir_mode()">DbEnv::set_intermediate_dir_mode()</a>, <a class="xref" href="envget_intermediate_dir_mode.html" title="DbEnv::get_intermediate_dir_mode()">DbEnv::get_intermediate_dir_mode()</a></td>
<td>Set/get intermediate directory creation mode</td>
</tr>
<tr>
<td>
<a class="xref" href="envset_isalive.html" title="DbEnv::set_isalive()">DbEnv::set_isalive()</a>
</td>
<td>Set thread is-alive callback</td>
</tr>
<tr>
<td><a class="xref" href="envset_memory_init.html" title="DbEnv::set_memory_init()">DbEnv::set_memory_init()</a>, <a class="xref" href="envget_memory_init.html" title="DbEnv::get_memory_init()">DbEnv::get_memory_init()</a></td>
<td>Set/get initial memory allocation</td>
</tr>
<tr>
<td><a class="xref" href="envset_memory_max.html" title="DbEnv::set_memory_max()">DbEnv::set_memory_max()</a>, <a class="xref" href="envget_memory_max.html" title="DbEnv::get_memory_max()">DbEnv::get_memory_max()</a></td>
<td>Set/get maximum memory allocation</td>
</tr>
<tr>
<td>
<a class="xref" href="envset_message_stream.html" title="DbEnv::set_message_stream()">DbEnv::set_message_stream()</a>
</td>
<td>Set C++ ostream used for informational messages</td>
</tr>
<tr>
<td>
<a class="xref" href="envset_msgcall.html" title="DbEnv::set_msgcall()">DbEnv::set_msgcall()</a>
</td>
<td>Set informational message callback</td>
</tr>
<tr>
<td><a class="xref" href="envset_msgfile.html" title="DbEnv::set_msgfile()">DbEnv::set_msgfile()</a>, <a class="xref" href="envget_msgfile.html" title="DbEnv::get_msgfile()">DbEnv::get_msgfile()</a></td>
<td>Set/get informational message FILE</td>
</tr>
<tr>
<td><a class="xref" href="envset_shm_key.html" title="DbEnv::set_shm_key()">DbEnv::set_shm_key()</a>, <a class="xref" href="envget_shm_key.html" title="DbEnv::get_shm_key()">DbEnv::get_shm_key()</a></td>
<td>Set/get system memory shared segment ID</td>
</tr>
<tr>
<td><a class="xref" href="envset_thread_count.html" title="DbEnv::set_thread_count()">DbEnv::set_thread_count()</a>, <a class="xref" href="envget_thread_count.html" title="DbEnv::get_thread_count()">DbEnv::get_thread_count()</a></td>
<td>Set/get approximate thread count</td>
</tr>
<tr>
<td>
<a class="xref" href="envset_thread_id.html" title="DbEnv::set_thread_id()">DbEnv::set_thread_id()</a>
</td>
<td>Set thread of control ID function</td>
</tr>
<tr>
<td>
<a class="xref" href="envset_thread_id_string.html" title="DbEnv::set_thread_id_string()">DbEnv::set_thread_id_string()</a>
</td>
<td>Set thread of control ID format function</td>
</tr>
<tr>
<td><a class="xref" href="envset_timeout.html" title="DbEnv::set_timeout()">DbEnv::set_timeout()</a>, <a class="xref" href="envget_timeout.html" title="DbEnv::get_timeout()">DbEnv::get_timeout()</a></td>
<td>Set/get lock and transaction timeout</td>
</tr>
<tr>
<td><a class="xref" href="envset_tmp_dir.html" title="DbEnv::set_tmp_dir()">DbEnv::set_tmp_dir()</a>, <a class="xref" href="envget_tmp_dir.html" title="DbEnv::get_tmp_dir()">DbEnv::get_tmp_dir()</a></td>
<td>Set/get the environment temporary file directory</td>
</tr>
<tr>
<td><a class="xref" href="envset_verbose.html" title="DbEnv::set_verbose()">DbEnv::set_verbose()</a>, <a class="xref" href="envget_verbose.html" title="DbEnv::get_verbose()">DbEnv::get_verbose()</a></td>
<td>Set/get verbose messages</td>
</tr>
<tr>
<td><a class="xref" href="envset_cachesize.html" title="DbEnv::set_cachesize()">DbEnv::set_cachesize()</a>, <a class="xref" href="envget_cachesize.html" title="DbEnv::get_cachesize()">DbEnv::get_cachesize()</a></td>
<td>Set/get the environment cache size</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="navfooter">
<hr />
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left"><a accesskey="p" href="dbmultiplerecnodatabuilder.html">Prev</a> </td>
<td width="20%" align="center"> </td>
<td width="40%" align="right"> <a accesskey="n" href="dbgetenv.html">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">DbMultipleRecnoDataBuilder </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
<td width="40%" align="right" valign="top"> Db::get_env()</td>
</tr>
</table>
</div>
</body>
</html>