public void AddDocumentBatch(long timeStamp, IImmutableList <Block> blocks) { var batch = new DocumentBatch { TimeStamp = timeStamp, Blocks = blocks }; InProgressDocumentBatches = InProgressDocumentBatches.Add(batch); }
public void CreateCheckPoint( long timeStamp, IImmutableList <Block>?idsBlocks, IImmutableList <Block>?sprocsBlocks, IImmutableList <Block>?functionsBlocks, IImmutableList <Block>?triggersBlocks) { var checkpoint = new LogCheckPoint { TimeStamp = timeStamp, DocumentBatches = InProgressDocumentBatches, IdsBlocks = idsBlocks, SprocsBlocks = sprocsBlocks, FunctionsBlocks = functionsBlocks, TriggersBlocks = triggersBlocks }; CheckPoints = CheckPoints.Add(checkpoint); InProgressDocumentBatches = InProgressDocumentBatches.Clear(); }
public IEnumerable <Block> GetInProgressDocumentsBlocks() { var docInprogressBlocks = InProgressDocumentBatches.SelectMany(b => b.Blocks); return(docInprogressBlocks); }