protected override Tree ShallowCloneInternal(Tree tree) { Db4objects.Db4o.Internal.TreeIntObject tio = (Db4objects.Db4o.Internal.TreeIntObject )base.ShallowCloneInternal(tree); tio._object = _object; return(tio); }
internal static Tree RemoveGreaterOrEqual(Db4objects.Db4o.Internal.Freespace.FreeSlotNode a_in, TreeIntObject a_finder) { if (a_in == null) { return null; } int cmp = a_in._key - a_finder._key; if (cmp == 0) { a_finder._object = a_in; // the highest node in the hierarchy !!! return a_in.Remove(); } if (cmp > 0) { a_in._preceding = RemoveGreaterOrEqual((Db4objects.Db4o.Internal.Freespace.FreeSlotNode )((Tree)a_in._preceding), a_finder); if (a_finder._object != null) { a_in._size--; return a_in; } a_finder._object = a_in; return a_in.Remove(); } a_in._subsequent = RemoveGreaterOrEqual((Db4objects.Db4o.Internal.Freespace.FreeSlotNode )((Tree)a_in._subsequent), a_finder); if (a_finder._object != null) { a_in._size--; } return a_in; }
public virtual void Add(SlotDetail slot) { if (TreeIntObject.Find(_slots, new TreeIntObject(slot._slot.Address())) != null) { _dupes.Add(new Pair(ByAddress(slot._slot.Address()), slot)); } _slots = (TreeIntObject)((TreeIntObject)TreeIntObject.Add(_slots, new TreeIntObject (slot._slot.Address(), slot))); }
public static TreeIntObject Add(TreeIntObject tree, int key, object value) { return((TreeIntObject)Add(tree, new TreeIntObject (key, value))); }
public static Db4objects.Db4o.Internal.TreeIntObject Add(Db4objects.Db4o.Internal.TreeIntObject tree, int key, object value) { return((Db4objects.Db4o.Internal.TreeIntObject)Tree.Add(tree, new Db4objects.Db4o.Internal.TreeIntObject (key, value))); }
public virtual void Add(Slot slot) { _slots = ((TreeIntObject) Tree.Add(_slots, new TreeIntObject(slot.Address(), slot) )); }
public virtual void ConvertCacheEvictedNodesToReadMode() { if (_evictedFromCache == null) { return; } Tree.Traverse(_evictedFromCache, new _IVisitor4_628()); _evictedFromCache = null; }
public virtual void EvictedFromCache(BTreeNode node) { _evictedFromCache = ((TreeIntObject)Tree.Add(_evictedFromCache, new TreeIntObject (node.GetID(), node))); }
internal virtual void RemoveNode(BTreeNode node) { _nodes = (TreeIntObject)((TreeInt)_nodes.RemoveLike(new TreeInt(node.GetID()))); }
internal virtual void AddNode(BTreeNode node) { _nodes = (TreeIntObject)((TreeIntObject)Tree.Add(_nodes, new TreeIntObject(node.GetID (), node))); AddToProcessing(node); }
public virtual BTreeNode ProduceNode(int id) { if (DTrace.enabled) { DTrace.BtreeProduceNode.Log(id); } TreeIntObject addtio = new TreeIntObject(id); _nodes = (TreeIntObject)((TreeIntObject)Tree.Add(_nodes, addtio)); TreeIntObject tio = (TreeIntObject)addtio.AddedOrExisting(); BTreeNode node = (BTreeNode)tio.GetObject(); if (node == null) { node = CacheEntry(new BTreeNode(id, this))._node; tio.SetObject(node); AddToProcessing(node); } return node; }
private void Purge() { if (_nodes == null) { return; } Tree temp = _nodes; _nodes = null; _root.HoldChildrenAsIDs(); AddNode(_root); temp.Traverse(new _IVisitor4_294()); for (IEnumerator entryIter = _nodeCache.GetEnumerator(); entryIter.MoveNext(); ) { BTreeNodeCacheEntry entry = ((BTreeNodeCacheEntry)entryIter.Current); entry._node.HoldChildrenAsIDs(); } }
private void AddMapping(Slot slot, ConsistencyChecker.SlotSource source) { mappings = ((TreeIntObject)Tree.Add(mappings, new ConsistencyChecker.MappingTree( slot, source))); }
public static TreeIntObject Add(TreeIntObject tree, int key, object value) { return ((TreeIntObject) Add(tree, new TreeIntObject (key, value))); }