示例#1
0
 protected override Tree ShallowCloneInternal(Tree tree)
 {
     Db4objects.Db4o.Internal.TreeIntObject tio = (Db4objects.Db4o.Internal.TreeIntObject
                                                   )base.ShallowCloneInternal(tree);
     tio._object = _object;
     return(tio);
 }
示例#2
0
		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;
		}
示例#3
0
		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)));
		}
示例#4
0
 public static TreeIntObject Add(TreeIntObject
                                 tree, int key, object value)
 {
     return((TreeIntObject)Add(tree, new TreeIntObject
                                   (key, value)));
 }
示例#5
0
 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)));
 }
示例#6
0
 public virtual void Add(Slot slot)
 {
     _slots = ((TreeIntObject) Tree.Add(_slots, new TreeIntObject(slot.Address(), slot)
         ));
 }
示例#7
0
文件: BTree.cs 项目: erdincay/db4o
		public virtual void ConvertCacheEvictedNodesToReadMode()
		{
			if (_evictedFromCache == null)
			{
				return;
			}
			Tree.Traverse(_evictedFromCache, new _IVisitor4_628());
			_evictedFromCache = null;
		}
示例#8
0
文件: BTree.cs 项目: erdincay/db4o
		public virtual void EvictedFromCache(BTreeNode node)
		{
			_evictedFromCache = ((TreeIntObject)Tree.Add(_evictedFromCache, new TreeIntObject
				(node.GetID(), node)));
		}
示例#9
0
文件: BTree.cs 项目: erdincay/db4o
		internal virtual void RemoveNode(BTreeNode node)
		{
			_nodes = (TreeIntObject)((TreeInt)_nodes.RemoveLike(new TreeInt(node.GetID())));
		}
示例#10
0
文件: BTree.cs 项目: erdincay/db4o
		internal virtual void AddNode(BTreeNode node)
		{
			_nodes = (TreeIntObject)((TreeIntObject)Tree.Add(_nodes, new TreeIntObject(node.GetID
				(), node)));
			AddToProcessing(node);
		}
示例#11
0
文件: BTree.cs 项目: erdincay/db4o
		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;
		}
示例#12
0
文件: BTree.cs 项目: erdincay/db4o
		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)));
		}
示例#14
0
 public static TreeIntObject Add(TreeIntObject
     tree, int key, object value)
 {
     return ((TreeIntObject) Add(tree, new TreeIntObject
         (key, value)));
 }