DBreeze.Storage.RISR.Commit C# (CSharp) Method

Commit() public method

Cleans all buffers and flushes data to the disk
public Commit ( ) : void
return void
        public void Commit()
        {
            lock (lock_fs)
            {
                FlushSequentialBuffer();
                FlushRandomBuffer();

                RIC.DataFileFlush();
                //NET_Flush(_fsData);

                if (_backupIsActive)
                {
                    this._configuration.Backup.Flush();
                }

                if (eofRollback != 0)
                {
                    //Finalizing rollback helper

                    eofRollback = 0;
                    RIC.RollbackHelperFilePosition = 0;
                    RIC.RollbackHelperFileWrite(eofRollback.To_8_bytes_array_BigEndian(), 0, 8, true);
                    //_fsRollbackHelper.Position = 0;
                    //_fsRollbackHelper.Write(eofRollback.To_8_bytes_array_BigEndian(), 0, 8);
                    //NET_Flush(_fsRollbackHelper);

                    if (_backupIsActive)
                    {
                        this._configuration.Backup.WriteBackupElement(ulFileName, 2, 0, eofRollback.To_8_bytes_array_BigEndian());
                        this._configuration.Backup.Flush();
                    }
                }

                _rollbackCache.Clear();

                //eofData = this._fsData.Length;
                eofData = RIC.DataFileLength;

            }
        }