Метод | Описание | |
---|---|---|
BeginTransaction ( ) : |
Create a transaction for use with the environment. The transaction handle may be discarded using Abort() or Commit(). Note: Transactions may not span threads; a transaction must only be used by a single thread. Also, a thread may only have a single transaction. Cursors may not span transactions; each cursor must be opened and closed within a single transaction.
|
|
BeginTransaction ( |
Create a transaction for use with the environment. The transaction handle may be discarded using Abort() or Commit(). Note: Transactions may not span threads; a transaction must only be used by a single thread. Also, a thread may only have a single transaction. Cursors may not span transactions; each cursor must be opened and closed within a single transaction.
|
|
BeginTransaction ( TransactionBeginFlags beginFlags ) : |
Create a transaction for use with the environment. The transaction handle may be discarded usingAbort() or Commit(). Note: Transactions may not span threads; a transaction must only be used by a single thread. Also, a thread may only have a single transaction. Cursors may not span transactions; each cursor must be opened and closed within a single transaction.
|
|
CopyTo ( string path, bool compact = false ) : void |
Copy an MDB environment to the specified path. This function may be used to make a backup of an existing environment.
|
|
Dispose ( ) : void |
Dispose the environment and release the memory map. Only a single thread may call this function. All transactions, databases, and cursors must already be closed before calling this function. Attempts to use any such handles after calling this function will cause a SIGSEGV. The environment handle will be freed and must not be used again after this call.
|
|
Flush ( bool force ) : void |
Flush the data buffers to disk. Data is always written to disk when LightningTransaction.Commit is called, but the operating system may keep it buffered. MDB always flushes the OS buffers upon commit as well, unless the environment was opened with EnvironmentOpenFlags.NoSync or in part EnvironmentOpenFlags.NoMetaSync.
|
|
Handle ( ) : |
||
LightningEnvironment ( string path, LightningDB.EnvironmentConfiguration configuration = null ) : System |
Creates a new instance of LightningEnvironment.
|
|
Open ( EnvironmentOpenFlags openFlags = EnvironmentOpenFlags.None, UnixAccessMode accessMode = UnixAccessMode.Default ) : void |
Open the environment.
|
Метод | Описание | |
---|---|---|
Dispose ( bool disposing ) : void |
Disposes the environment and deallocates all resources associated with it.
|
Метод | Описание | |
---|---|---|
EnsureOpened ( ) : void |
public BeginTransaction ( ) : |
||
Результат |
public BeginTransaction ( |
||
parent | /// If this parameter is non-NULL, the new transaction will be a nested transaction, with the transaction indicated by parent as its parent. /// Transactions may be nested to any level. /// A parent transaction may not issue any other operations besides BeginTransaction, Abort, or Commit while it has active child transactions. /// | |
beginFlags | TransactionBeginFlags | /// Special options for this transaction. /// |
Результат |
public BeginTransaction ( TransactionBeginFlags beginFlags ) : |
||
beginFlags | TransactionBeginFlags | /// Special options for this transaction. /// |
Результат |
public CopyTo ( string path, bool compact = false ) : void | ||
path | string | The directory in which the copy will reside. This directory must already exist and be writable but must otherwise be empty. |
compact | bool | Omit empty pages when copying. |
Результат | void |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | True if called from Dispose. |
Результат | void |
public Flush ( bool force ) : void | ||
force | bool | If true, force a synchronous flush. Otherwise if the environment has the EnvironmentOpenFlags.NoSync flag set the flushes will be omitted, and with MDB_MAPASYNC they will be asynchronous. |
Результат | void |
public LightningEnvironment ( string path, LightningDB.EnvironmentConfiguration configuration = null ) : System | ||
path | string | Directory for storing database files. |
configuration | LightningDB.EnvironmentConfiguration | Configuration for the environment. |
Результат | System |
public Open ( EnvironmentOpenFlags openFlags = EnvironmentOpenFlags.None, UnixAccessMode accessMode = UnixAccessMode.Default ) : void | ||
openFlags | EnvironmentOpenFlags | |
accessMode | UnixAccessMode | |
Результат | void |