Enum EnvOpenOptions
Specifies the subsystems that are initialized and how the application's environment affects Figaro file naming, among other things.
Namespace: Figaro
Assembly: Figaro.dll
Syntax
[Flags]
public enum EnvOpenOptions
Remarks
The choice of subsystems initialized for a Figaro database environment is specified by the thread of control initially creating the environment. Any subsequent thread of control joining the environment will automatically be configured to use the same subsystems as were created in the environment (unless the thread of control requests a subsystem not available in the environment, which will fail). Applications joining an environment, able to adapt to whatever subsystems have been configured in the environment, should open the environment without specifying any subsystem flags. Applications joining an environment, requiring specific subsystems from their environments, should open the environment specifying those specific subsystem flags.
This enumeration can be bitwise OR'd together with multiple values where it is used.
Fields
Name | Description |
---|---|
ConcurrentDataStoreDefaults | Initialize the Concurrent Data Store (CDS) defaults (InitConcurrentDataStore and InitMemoryBufferPool). Note that AllConcurrentDatabases will automatically be set with this flag enabled. |
Create | Cause Figaro subsystems to create any underlying files, as necessary. |
Failcheck | Run a failcheck operation against the environment, which checks for threads of control (either a true thread or a process) that have exited while manipulating Berkeley DB library data structures, while holding a logical database lock, or with an unresolved transaction (that is, a transaction that was never aborted or committed). |
InitConcurrentDataStore | Initialize locking for the Figaro Concurrent Data Store subsystem. In this mode, Figaro provides multiple reader/single writer access. The only other subsystem that should be specified with the InitConcurrentDataStore flag is InitMemoryBufferPool. |
InitLock | Initialize the locking subsystem.Use when multiple processes or threads are reading and writing a database so that they do not interfere with each other. If all threads are accessing the database(s) read-only, locking is unnecessary. When the InitLog flag is specified, it is usually necessary to run a deadlock detector, as well. See DeadlockDetectPolicy for more information. |
InitLog | Initialize the logging subsystem. Used when recovery from application or system failure is necessary. If the log region is being created and log files are already present, the log files are reviewed and writes are appended to the end of the log, rather than overwriting current log entries. |
InitMemoryBufferPool | Initialize the shared memory buffer pool subsystem. Used whenever an application is using any Figaro access method. |
InitTransaction | Initialize the transaction subsystem. This subsystem should be used when recovery and atomicity of multiple operations are important. The InitTransaction flag implies the InitLog flag. |
Lockdown | Lock shared Figaro environment files and memory-mapped databases into memory. |
None | No options. |
Private | Allocate region memory from the heap instead of from memory backed by the file system or system shared memory. |
Recover | Run normal recovery on this environment before opening it for normal use. If this flag is set, the Create and InitTransaction flags must also be set because the regions will be removed and re-created, and transactions are required for application recovery. |
RecoverFatal | Run catastrophic recovery on this environment before opening it for normal use. If this flag is set, the Create and InitTransaction flags must also be set, because the regions will be removed and re-created, and transactions are required for application recovery. |
Register | Check to see if recovery needs to be performed before opening the database environment. |
Replication | Initialize the replication subsystem. This subsystem should be used whenever an application plans on using replication. This flag requires the InitTransaction and InitLock flags also be configured. |
ReplicationDefaults | Initializes the Replication subsystem with the |
SystemSharedMem | Allocate region memory from system shared memory instead of from heap memory or memory backed by the file system. See Shared Memory Regions for more information. |
Thread | Cause the FigaroEnv handle returned by Open(String, EnvOpenOptions) to be free-threaded; that is, concurrently usable by multiple threads in the address space. This flag should be specified if the FigaroEnv handle will be concurrently used by more than one thread in the process, or if any Db handles opened in the scope of the FigaroEnv handle will be concurrently used by more than one thread in the process. |
TransactionDefaults | Combines the most commonly used transaction flags: InitLock, InitLog, InitMemoryBufferPool, and InitTransaction. |
UseEnvironment | The Figaro process' environment may be permitted to specify information to be used when naming files; see @file-naming.md. Because permitting users to specify which files are used can create security problems, environment information will be used in file naming for all users only if the UseEnvironment flag is set. |
UseEnvironmentRoot | The Figaro process' environment may be permitted to specify information to be used when naming files; see @file-naming.md. Because permitting users to specify which files are used can create security problems, if the UseEnvironmentRoot flag is set, environment information will be used for file naming only for users with appropriate permissions (for example, users with a user-ID of 0 on UNIX systems). |