public bool TryLoad(ulong documentKey, out IEnumerable <IPropertyDatabaseRecord> records) { records = null; using (LockRead()) { if (m_Fs == null) { return(false); } var binarySearchRange = PropertyDatabaseRecordFinder.FindRange(this, documentKey); if (binarySearchRange == BinarySearchRange.invalid) { return(false); } var result = new List <IPropertyDatabaseRecord>(); for (var i = binarySearchRange.startOffset; i < binarySearchRange.endOffset; ++i) { var record = GetRecord(i); if (record.IsValid()) { result.Add(record); } } records = result; return(true); } }
public void Invalidate(ulong documentKey, bool sync) { using (LockUpgradeableRead()) { var binarySearchRange = PropertyDatabaseRecordFinder.FindRange(this, documentKey); if (binarySearchRange == BinarySearchRange.invalid) { return; } InvalidateRange(binarySearchRange); } }