/// <summary> /// Retrives a container from the cachel /// </summary> /// <param name="treeAddress">The address of the container</param> /// <returns>The container</returns> private BTreeContainer GetContainerFromCache(BTreeAddress treeAddress) { BTreeContainer container = null; _cache.TryGetValue(treeAddress, out container); return(container); }
/// <summary> /// Adds a container to cache from disk. If this is a new table, will add a new container to the cache. /// </summary> /// <param name="address">The address of this btree</param> private void AddContainerToCache(BTreeAddress address) { BTreeContainer container = GetContainerFromDisk(address); _cache.TryAdd(address, container); }
public void SetContainer(BTreeContainer container) { _container = container; }