public class DbEnv extends Object
public DbEnv(int flags) throws DbException;
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
DbEnv handles are free-threaded if the Db.DB_THREAD flag
is specified to the DbEnv.open 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, Db
or DbTxn). Once either the DbEnv.close or
DbEnv.remove methods are called, the handle may not be accessed again,
regardless of the method's return.
The constructor creates the DbEnv object. The constructor
allocates memory internally; calling the DbEnv.close or
DbEnv.remove methods will free that memory.
The following flags value may be specified:
- Create a client environment to connect to a server.
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 DbEnv.set_rpc_server method to
establish the connection to the server.
Database Environments and Related Methods
Copyright Sleepycat Software