private WriteHeader ( |
||
writer | ||
Результат | void |
void WriteStartOfNewTransactionLogFile() { if (_writerWithTransactionLog != null) { _writerWithTransactionLog.WriteUInt8((byte)KVCommandType.EndOfFile); _writerWithTransactionLog.FlushBuffer(); _fileWithTransactionLog.HardFlush(); _fileWithTransactionLog.Truncate(); _fileIdWithPreviousTransactionLog = _fileIdWithTransactionLog; } _fileWithTransactionLog = FileCollection.AddFile("trl"); _fileIdWithTransactionLog = _fileWithTransactionLog.Index; var transactionLog = new FileTransactionLog(FileCollection.NextGeneration(), FileCollection.Guid, _fileIdWithPreviousTransactionLog); _writerWithTransactionLog = _fileWithTransactionLog.GetAppenderWriter(); transactionLog.WriteHeader(_writerWithTransactionLog); FileCollection.SetInfo(_fileIdWithTransactionLog, transactionLog); }