Example #1
0
        /// <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);
        }
Example #2
0
        /// <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);
        }
Example #3
0
 public void SetContainer(BTreeContainer container)
 {
     _container = container;
 }