public void AddContext(string key, out PagePointer ptr) { if (!_header.TryGetPointer(key, out ptr)) { throw new KeyNotFoundException($"not found key in header: {key}"); } _cachedCtx.Add(key, new Context { pageIndex = ptr.index, key = key, offset = ptr.offset, count = ptr.size, }); _cleaner.RegistPriority(key); _increaseRef(ptr.index); }
public bool TryGetPointer(string key, out PagePointer pair) { return(_ptrDic.TryGetValue(key, out pair)); }