private void AddToUrlTree(Pair <UrlTree, Queue <TextBlockHistoryEntry> > textBlockInfo, string responseUrl, ArrayList <ulong> hashCodes, bool fullPath, string corpusId, string documentId, string domainName, DateTime time, bool incDocCount) { UrlTree urlTree = textBlockInfo.First; Queue <TextBlockHistoryEntry> queue = textBlockInfo.Second; TextBlockHistoryEntry historyEntry = new TextBlockHistoryEntry(responseUrl, hashCodes, fullPath, time, /*decDocCount=*/ incDocCount); urlTree.Insert(responseUrl, hashCodes, mMinNodeDocCount, fullPath, /*insertUnique=*/ true, incDocCount); queue.Enqueue(historyEntry); }
private void AddToUrlTree(Pair <UrlTree, Queue <TextBlockHistoryEntry> > textBlockInfo, string responseUrl, ArrayList <ulong> hashCodes, bool fullPath, string corpusId, string documentId, string domainName, DateTime time, bool incDocCount) { UrlTree urlTree = textBlockInfo.First; Queue <TextBlockHistoryEntry> queue = textBlockInfo.Second; TextBlockHistoryEntry historyEntry = new TextBlockHistoryEntry(responseUrl, hashCodes, fullPath, time, /*decDocCount=*/ incDocCount); urlTree.Insert(responseUrl, hashCodes, mMinNodeDocCount, fullPath, /*insertUnique=*/ true, incDocCount); queue.Enqueue(historyEntry); if (mDbConnection != null) { BinarySerializer memSer = new BinarySerializer(); historyEntry.mHashCodes.Save(memSer); byte[] buffer = ((MemoryStream)memSer.Stream).GetBuffer(); string hashCodesBase64 = Convert.ToBase64String(buffer, 0, (int)memSer.Stream.Position); mDbConnection.ExecuteNonQuery("insert into TextBlocks (corpusId, docId, hashCodes) values (?, ?, ?)", corpusId, documentId, hashCodesBase64); } }