Exemplo n.º 1
0
        public IEnumerable<LTrieRow> IterateBackwardStartFrom(byte[] key, bool includeStartKey, 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();

                Backward bw = new Backward(rn);
                return bw.IterateBackwardStartFrom(key, includeStartKey,false);

            }
            else
            {
                Backward bw = new Backward((LTrieRootNode)readRootNode);
                return bw.IterateBackwardStartFrom(key, includeStartKey,true);
            }
        }
Exemplo n.º 2
0
        public IEnumerable<LTrieRow> IterateBackwardSkipFrom(byte[] key, ulong skippingQuantity, bool useCache)
        {
            this.CheckTableIsOperable();

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

                Backward bw = new Backward(rn);
                return bw.IterateBackwardSkipFrom(key, skippingQuantity, false);

            }
            else
            {
                LTrieRootNode readRootNode = new LTrieRootNode(this);
                Backward bw = new Backward(readRootNode);
                return bw.IterateBackwardSkipFrom(key, skippingQuantity, true);
            }
        }
Exemplo n.º 3
0
        public IEnumerable<LTrieRow> IterateBackwardStartFrom(byte[] key, bool includeStartKey)
        {
            this.CheckTableIsOperable();

            LTrieRootNode readRootNode = new LTrieRootNode(this);
            Backward bw = new Backward(readRootNode);
            return bw.IterateBackwardStartFrom(key, includeStartKey,true);
        }
Exemplo n.º 4
0
        public IEnumerable<LTrieRow> IterateBackwardSkip(ulong skippingQuantity, 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();

                Backward bw = new Backward(rn);
                return bw.IterateBackwardSkip(skippingQuantity,false);

            }
            else
            {
                Backward bw = new Backward((LTrieRootNode)readRootNode);
                return bw.IterateBackwardSkip(skippingQuantity,true);
            }
        }
Exemplo n.º 5
0
        public IEnumerable<LTrieRow> IterateBackwardSkipFrom(byte[] key, ulong skippingQuantity)
        {
            this.CheckTableIsOperable();

            LTrieRootNode readRootNode = new LTrieRootNode(this);

            Backward bw = new Backward(readRootNode);
            return bw.IterateBackwardSkipFrom(key, skippingQuantity,true);
        }
Exemplo n.º 6
0
        public IEnumerable<LTrieRow> IterateBackwardFromTo(byte[] startKey, byte[] stopKey, bool includeStartKey, bool includeStopKey, bool useCache)
        {
            this.CheckTableIsOperable();

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

                Backward bw = new Backward(rn);
                return bw.IterateBackwardFromTo(startKey, stopKey, includeStartKey, includeStopKey, false);

            }
            else
            {
                LTrieRootNode readRootNode = new LTrieRootNode(this);
                Backward bw = new Backward(readRootNode);
                return bw.IterateBackwardFromTo(startKey, stopKey, includeStartKey, includeStopKey, true);
            }
        }
Exemplo n.º 7
0
        public LTrieRow IterateBackwardForMaximal(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();

                Backward bw = new Backward(rn);
                return bw.IterateBackwardForMaximal(false);

            }
            else
            {
                Backward bw = new Backward((LTrieRootNode)readRootNode);
                return bw.IterateBackwardForMaximal(true);
            }
        }
Exemplo n.º 8
0
        public LTrieRow IterateBackwardForMaximal()
        {
            this.CheckTableIsOperable();

            LTrieRootNode readRootNode = new LTrieRootNode(this);

            Backward bw = new Backward(readRootNode);
            return bw.IterateBackwardForMaximal(true);
        }
Exemplo n.º 9
0
        public IEnumerable<LTrieRow> IterateBackward()
        {
            this.CheckTableIsOperable();

            LTrieRootNode readRootNode = new LTrieRootNode(this);

            Backward bw = new Backward(readRootNode);
            return bw.IterateBackward(true);
        }
Exemplo n.º 10
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="startKey"></param>
        /// <returns></returns>
        public IEnumerable<LTrieRow> IterateBackwardStartsWithClosestToPrefix(byte[] startKey)
        {
            this.CheckTableIsOperable();

            LTrieRootNode readRootNode = new LTrieRootNode(this);

            Backward bw = new Backward(readRootNode);
            return bw.IterateBackwardStartsWithClosestToPrefix(startKey, true);
        }