Exemple #1
0
        public static XBplusTreeBytes ReadOnly(string treefileName, string blockfileName)
        {
            BplusTreeBytes tree         = BplusTreeBytes.ReadOnly(treefileName, blockfileName);
            int            prefixLength = tree.MaxKeyLength();

            return(new XBplusTreeBytes(tree, prefixLength));
        }
Exemple #2
0
        public static XBplusTreeBytes ReOpen(System.IO.Stream treefile, System.IO.Stream blockfile)
        {
            BplusTreeBytes tree         = BplusTreeBytes.ReOpen(treefile, blockfile);
            int            prefixLength = tree.MaxKeyLength();

            return(new XBplusTreeBytes(tree, prefixLength));
        }
Exemple #3
0
        public new static HBplusTreeBytes ReOpen(string treefileName, string blockfileName)
        {
            BplusTreeBytes tree         = BplusTreeBytes.ReOpen(treefileName, blockfileName);
            int            prefixLength = tree.MaxKeyLength();

            return(new HBplusTreeBytes(tree, prefixLength));
        }
Exemple #4
0
 public XBplusTreeBytes(BplusTreeBytes tree, int prefixLength)
 {
     if (prefixLength < 3)
     {
         throw new BplusTreeException("prefix cannot be smaller than 3 :: " + prefixLength);
     }
     if (prefixLength > tree.MaxKeyLength())
     {
         throw new BplusTreeException("prefix length cannot exceed keylength for internal tree");
     }
     this.tree         = tree;
     this.PrefixLength = prefixLength;
 }