Upscaledb.Environment.Flush C# (CSharp) Method

Flush() public method

Flushes the Environment
This method wraps the native ups_env_flush function.
This function flushes the Database cache and writes the whole file to disk.
Since In-Memory Environments do not have a file on disk, the function will have no effect and will return successfully.
public Flush ( ) : void
return void
        public void Flush()
        {
            int st;
              lock (this) {
            st = NativeMethods.EnvFlush(handle, 0);
              }
              if (st != 0)
            throw new DatabaseException(st);
        }

Usage Example

Esempio n. 1
0
 private void Flush()
 {
     Upscaledb.Environment env = new Upscaledb.Environment();
     env.Create("ntest.db");
     env.Flush();
     env.Close();
 }
All Usage Examples Of Upscaledb.Environment::Flush