IterateForwardStartsWith() public method

public IterateForwardStartsWith ( byte initKey, bool useCache ) : IEnumerable
initKey byte
useCache bool
return IEnumerable
示例#1
0
        public IEnumerable<LTrieRow> IterateForwardStartsWith(byte[] startKey, ITrieRootNode readRootNode)
        {
            this.CheckTableIsOperable();

            if (readRootNode==null)
            {
                //Flashing changes on the disk before commit. In case if the same thread uses the same root node
                this.SaveGenerationMap();

                Forward bw = new Forward(rn);
                return bw.IterateForwardStartsWith(startKey,false);

            }
            else
            {
                Forward bw = new Forward((LTrieRootNode)readRootNode);
                return bw.IterateForwardStartsWith(startKey,true);
            }
        }
示例#2
0
        /// <summary>
        /// Always creates new root to get committed data
        /// </summary>
        /// <param name="startKey"></param>
        /// <returns></returns>
        public IEnumerable<LTrieRow> IterateForwardStartsWith(byte[] startKey)
        {
            this.CheckTableIsOperable();

            LTrieRootNode readRootNode = new LTrieRootNode(this);

            Forward bw = new Forward(readRootNode);

            return bw.IterateForwardStartsWith(startKey,true);
        }