protected override Tree ShallowCloneInternal(Tree tree) { Db4objects.Db4o.Internal.TreeInt treeint = (Db4objects.Db4o.Internal.TreeInt)base .ShallowCloneInternal(tree); treeint._key = _key; return(treeint); }
public override object ShallowClone() { var treeint = new TreeInt(_key ); return(ShallowCloneInternal(treeint)); }
public virtual bool Delete(ObjectReference @ref, int id, int cascade) { CheckSynchronization(); if (@ref != null) { if (!_container.FlagForDelete(@ref)) { return(false); } } if (DTrace.enabled) { DTrace.TransDelete.Log(id); } DeleteInfo info = (DeleteInfo)TreeInt.Find(_delete, id); if (info == null) { info = new DeleteInfo(id, @ref, cascade); _delete = Tree.Add(_delete, info); return(true); } info._reference = @ref; if (cascade > info._cascade) { info._cascade = cascade; } return(true); }
public static int MarshalledLength(TreeInt a_tree) { if (a_tree == null) { return(Const4.IntLength); } return(a_tree.MarshalledLength()); }
private bool AlreadyHandled() { TreeInt newNode = new TreeInt(_id); _transaction._writtenUpdateAdjustedIndexes = Tree.Add(_transaction._writtenUpdateAdjustedIndexes , newNode); return(!newNode.WasAddedToTree()); }
public static int MarshalledLength(Db4objects.Db4o.Internal.TreeInt a_tree) { if (a_tree == null) { return(Const4.IntLength); } return(a_tree.MarshalledLength()); }
public static QCandidate ToQCandidate(TreeInt tree, QCandidates candidates) { if (tree == null) { return(null); } return(tree.ToQCandidate(candidates)); }
public static QCandidate ToQCandidate(Db4objects.Db4o.Internal.TreeInt tree, QCandidates candidates) { if (tree == null) { return(null); } return(tree.ToQCandidate(candidates)); }
private Tree CreateTree(int[] values) { Tree tree = new TreeInt(values[0]); for (var i = 1; i < values.Length; i++) { tree = tree.Add(new TreeInt(values[i])); } return tree; }
internal virtual void CreateIDMapping(DefragmentServicesImpl context, int objectID , bool isClassID) { if (BatchFull()) { Flush(context); } _ids = TreeInt.Add(_ids, (isClassID ? -objectID : objectID)); }
public static TreeInt AddToTree(TreeInt tree, IIndexedNode node) { IEnumerator i = node.GetEnumerator(); while (i.MoveNext()) { IFieldIndexKey composite = (IFieldIndexKey)i.Current; tree = (TreeInt)((TreeInt)Tree.Add(tree, new TreeInt(composite.ParentID()))); } return tree; }
public static void Write(ByteArrayBuffer buffer, Db4objects.Db4o.Internal.TreeInt tree, int size) { if (tree == null) { buffer.WriteInt(0); return; } buffer.WriteInt(size); tree.Traverse(new _IVisitor4_97(buffer)); }
public virtual void DontDelete(int a_id) { if (DTrace.enabled) { DTrace.TransDontDelete.Log(a_id); } if (_delete == null) { return; } _delete = TreeInt.RemoveLike((TreeInt)_delete, a_id); }
public virtual void AddKeyCheckDuplicates(int a_key) { if (_checkDuplicates) { TreeInt newNode = new TreeInt(a_key); _candidates = Tree.Add(_candidates, newNode); if (newNode._size == 0) { return; } } Add(a_key); }
public static Tree AddAll(Tree tree, IIntIterator4 iter) { if (!iter.MoveNext()) { return tree; } Db4objects.Db4o.Internal.TreeInt firstAdded = new Db4objects.Db4o.Internal.TreeInt (iter.CurrentInt()); tree = Tree.Add(tree, firstAdded); while (iter.MoveNext()) { tree = tree.Add(new Db4objects.Db4o.Internal.TreeInt(iter.CurrentInt())); } return tree; }
public static Tree AddAll(Tree tree, IIntIterator4 iter) { if (!iter.MoveNext()) { return tree; } var firstAdded = new TreeInt (iter.CurrentInt()); tree = Add(tree, firstAdded); while (iter.MoveNext()) { tree = tree.Add(new TreeInt(iter.CurrentInt())); } return tree; }
public static Tree AddAll(Tree tree, IIntIterator4 iter) { if (!iter.MoveNext()) { return(tree); } Db4objects.Db4o.Internal.TreeInt firstAdded = new Db4objects.Db4o.Internal.TreeInt (iter.CurrentInt()); tree = Tree.Add(tree, firstAdded); while (iter.MoveNext()) { tree = tree.Add(new Db4objects.Db4o.Internal.TreeInt(iter.CurrentInt())); } return(tree); }
public static Tree AddAll(Tree tree, IIntIterator4 iter) { if (!iter.MoveNext()) { return(tree); } var firstAdded = new TreeInt (iter.CurrentInt()); tree = Add(tree, firstAdded); while (iter.MoveNext()) { tree = tree.Add(new TreeInt(iter.CurrentInt())); } return(tree); }
private void DeleteMembers(StatefulBuffer objectBytes) { ObjectHeader oh = new ObjectHeader(_clazz, objectBytes); DeleteInfo info = (DeleteInfo)TreeInt.Find(_transaction._delete, _id); if (info != null) { if (info._cascade > _cascade) { _cascade = info._cascade; } } objectBytes.SetCascadeDeletes(_cascade); DeleteContextImpl context = new DeleteContextImpl(objectBytes, oh, _clazz.ClassReflector (), null); _clazz.DeleteMembers(context, _typeInfo, true); }
public override void Write(ByteArrayBuffer a_writer) { a_writer.WriteInt(_key); if (_object == null) { a_writer.WriteInt(0); } else { if (_object is TreeInt) { TreeInt.Write(a_writer, (TreeInt)_object); } else { ((IReadWriteable)_object).Write(a_writer); } } }
public virtual void Flush(DefragmentServicesImpl context) { if (_ids == null) { return; } IEnumerator idIter = new TreeKeyIterator(_ids); while (idIter.MoveNext()) { var objectID = ((int) idIter.Current); var isClassID = false; if (objectID < 0) { objectID = -objectID; isClassID = true; } // seen object ids don't come by here anymore - any other candidates? context.MapIDs(objectID, context.TargetNewId(), isClassID); } context.Mapping().Commit(); _ids = null; }
protected virtual void AssertTreeInt(int[] expectedValues, TreeInt treeInt) { var visitor = ExpectingVisitor.CreateExpectingVisitor(expectedValues ); treeInt.Traverse(new _IVisitor4_113(visitor)); visitor.AssertExpectations(); }
public void Visit(object a_object) { QCandidate candidate = (QCandidate)a_object; if (candidate.Include()) { TreeInt ids = new TreeInt(candidate._key); ByRef idsNew = new ByRef(); IEnumerator itPath = executionPath.GetEnumerator(); while (itPath.MoveNext()) { idsNew.value = null; string fieldName = (string)(itPath.Current); if (ids != null) { ids.Traverse(new _IVisitor4_385(this, stream, fieldName, idsNew)); } ids = (TreeInt)((TreeInt)idsNew.value); } if (ids != null) { ids.Traverse(new _IVisitor4_406(result)); } } }
private void AssertComplexItems(int[] expectedFoos, TreeInt found) { Assert.IsNotNull(found); AssertTreeInt(MapToObjectIds(CreateComplexItemQuery(), expectedFoos), found); }
private bool AlreadyHandled() { TreeInt newNode = new TreeInt(_id); _transaction._writtenUpdateAdjustedIndexes = Tree.Add(_transaction._writtenUpdateAdjustedIndexes , newNode); return !newNode.WasAddedToTree(); }
public virtual Tree Find(int key) { return(TreeInt.Find(_tree, key)); }
internal void FreePrefetchedIDs(IIdSystem idSystem) { if (_prefetchedIDs == null) { return; } idSystem.ReturnUnusedIds(_prefetchedIDs); _prefetchedIDs = null; }
public static QCandidate ToQCandidate(TreeInt tree, QCandidates candidates) { if (tree == null) { return null; } return tree.ToQCandidate(candidates); }
public static void Write(ByteArrayBuffer buffer, TreeInt tree, int size) { if (tree == null) { buffer.WriteInt(0); return; } buffer.WriteInt(size); tree.Traverse(new _IVisitor4_97(buffer)); }
public override object ShallowClone() { Db4objects.Db4o.Internal.TreeInt treeint = new Db4objects.Db4o.Internal.TreeInt(_key ); return(ShallowCloneInternal(treeint)); }
public static Db4objects.Db4o.Internal.TreeInt RemoveLike(Db4objects.Db4o.Internal.TreeInt tree, int value) { return((Db4objects.Db4o.Internal.TreeInt)Tree.RemoveLike(tree, new Db4objects.Db4o.Internal.TreeInt (value))); }
public bool Match(object current) { int id = ((int)current); if (this.ids.Find(id) != null) { return false; } this.ids = (TreeInt)((TreeInt)this.ids.Add(new TreeInt(id))); return true; }
public void Visit(int id) { TreeInt ids = new TreeInt(id); ByRef idsNew = new ByRef(); IEnumerator itPath = _executionPath.GetEnumerator(); while (itPath.MoveNext()) { idsNew.value = null; string fieldName = (string)(itPath.Current); ids.Traverse(new _IVisitor4_508(this, fieldName, idsNew)); ids = (TreeInt)((TreeInt)idsNew.value); if (ids == null) { return; } } ids.Traverse(new _IVisitor4_529(this)); }
public virtual void AddPrefetchedID(int id) { _prefetchedIDs = ((TreeInt)Tree.Add(_prefetchedIDs, new TreeInt(id))); }
public override object ShallowClone() { var treeint = new TreeInt(_key ); return ShallowCloneInternal(treeint); }
public virtual void PrefetchedIDConsumed(int id) { _prefetchedIDs = ((TreeInt)_prefetchedIDs.RemoveLike(new TreeInt(id))); }
public static int MarshalledLength(TreeInt a_tree) { if (a_tree == null) { return Const4.IntLength; } return a_tree.MarshalledLength(); }
public static TreeInt RemoveLike(TreeInt tree, int value) { return((TreeInt)RemoveLike(tree, new TreeInt (value))); }
public static TreeInt Add(TreeInt tree, int value) { return (TreeInt) Add(tree, new TreeInt(value)); }
public static TreeInt Add(TreeInt tree, int value) { return((TreeInt)Add(tree, new TreeInt(value))); }
public static TreeInt RemoveLike(TreeInt tree, int value) { return (TreeInt) RemoveLike(tree, new TreeInt (value)); }
public void Visit(object obj) { int id = ((int)obj); TreeInt newNode = new TreeInt(id); duplicates.value = Tree.Add(((Tree)duplicates.value), newNode); if (newNode.Size() != 0) { this._enclosing.Add(id); } }
public static Db4objects.Db4o.Internal.TreeInt Add(Db4objects.Db4o.Internal.TreeInt tree, int value) { return((Db4objects.Db4o.Internal.TreeInt)((Db4objects.Db4o.Internal.TreeInt)Tree. Add(tree, new Db4objects.Db4o.Internal.TreeInt(value)))); }
public object PeekPersisted(Transaction trans, int id, IActivationDepth depth, bool resetJustPeeked) { if (resetJustPeeked) { _justPeeked = null; } else { TreeInt ti = new TreeInt(id); TreeIntObject tio = (TreeIntObject)Tree.Find(_justPeeked, ti); if (tio != null) { return tio._object; } } ObjectReference @ref = PeekReference(trans, id, depth, resetJustPeeked); return @ref.GetObject(); }
public static void Write(ByteArrayBuffer buffer, Db4objects.Db4o.Internal.TreeInt tree) { Write(buffer, tree, tree == null ? 0 : tree.Size()); }
public void Add(TreeInt node) { tree = (TreeInt)((TreeInt)Tree.Add(tree, node)); }
public override bool Equals(object obj) { Db4objects.Db4o.Internal.TreeInt other = (Db4objects.Db4o.Internal.TreeInt)obj; return(other._key == _key); }
public override object ShallowClone() { Db4objects.Db4o.Internal.TreeInt treeint = new Db4objects.Db4o.Internal.TreeInt(_key ); return ShallowCloneInternal(treeint); }
public static void Write(ByteArrayBuffer buffer, TreeInt tree) { Write(buffer, tree, tree == null ? 0 : tree.Size()); }
public virtual void AddId(int id) { _ids = (TreeInt)((TreeInt)Tree.Add(_ids, new TreeInt(id))); }