public BTree(Transaction trans, BTreeConfiguration config, int id, IIndexable4 keyHandler , int treeNodeSize) : base(config._idSystem) { _config = config; if (null == keyHandler) { throw new ArgumentNullException(); } _nodeSize = treeNodeSize; _nodeCache = CacheFactory.NewLRUIntCache(config._cacheSize); _halfNodeSize = _nodeSize / 2; _nodeSize = _halfNodeSize * 2; _keyHandler = keyHandler; SetID(id); if (IsNew()) { SetStateDirty(); _root = new BTreeNode(this, 0, true, 0, 0, 0); _root.Write(trans.SystemTransaction()); AddNode(_root); Write(trans.SystemTransaction()); } else { SetStateDeactivated(); } }
public BTree(Transaction trans, BTreeConfiguration config, int id, IIndexable4 keyHandler , int treeNodeSize) : base(config._idSystem) { _config = config; if (null == keyHandler) { throw new ArgumentNullException(); } _nodeSize = treeNodeSize; _nodeCache = CacheFactory.NewLRUIntCache(config._cacheSize); _halfNodeSize = _nodeSize / 2; _nodeSize = _halfNodeSize * 2; _keyHandler = keyHandler; SetID(id); if (IsNew()) { SetStateDirty(); _root = new BTreeNode(this, 0, true, 0, 0, 0); _root.Write(trans.SystemTransaction()); AddNode(_root); Write(trans.SystemTransaction()); } else { SetStateDeactivated(); } }
private void CreateBTrees(int addressID, int lengthID) { BTreeConfiguration config = new BTreeConfiguration(_idSystem, SlotChangeFactory.FreeSpace , 64, false); _slotsByAddress = new BTree(Transaction(), config, addressID, new AddressKeySlotHandler ()); _slotsByLength = new BTree(Transaction(), config, lengthID, new LengthKeySlotHandler ()); }
public BTree(Transaction trans, BTreeConfiguration config, int id, IIndexable4 keyHandler ) : this(trans, config, id, keyHandler, Config(trans).BTreeNodeSize()) { }
public BTree(Transaction trans, BTreeConfiguration config, IIndexable4 keyHandler ) : this(trans, config, 0, keyHandler) { }
public BTree(Transaction trans, BTreeConfiguration config, IIndexable4 keyHandler ) : this(trans, config, 0, keyHandler) { }
public BTree(Transaction trans, BTreeConfiguration config, int id, IIndexable4 keyHandler ) : this(trans, config, id, keyHandler, Config(trans).BTreeNodeSize()) { }