当前位置: 首页>>代码示例>>C#>>正文


C# LocalObjectContainer.SystemTransaction方法代码示例

本文整理汇总了C#中Db4objects.Db4o.Internal.LocalObjectContainer.SystemTransaction方法的典型用法代码示例。如果您正苦于以下问题:C# LocalObjectContainer.SystemTransaction方法的具体用法?C# LocalObjectContainer.SystemTransaction怎么用?C# LocalObjectContainer.SystemTransaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Db4objects.Db4o.Internal.LocalObjectContainer的用法示例。


在下文中一共展示了LocalObjectContainer.SystemTransaction方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AssertSingleEntry

 public virtual void AssertSingleEntry(LocalObjectContainer container, long id)
 {
     var called = new BooleanByRef();
     Index(container).TraverseKeys(container.SystemTransaction(), new _IVisitor4_24(id
         , called));
     Assert.IsTrue(called.value);
 }
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:FieldIndexAssert.cs

示例2: RebuildIndexForObject

		/// <exception cref="Db4objects.Db4o.Internal.FieldIndexException"></exception>
		protected virtual void RebuildIndexForObject(LocalObjectContainer container, int 
			objectId)
		{
			StatefulBuffer writer = container.ReadStatefulBufferById(container.SystemTransaction
				(), objectId);
			if (writer != null)
			{
				RebuildIndexForWriter(container, writer, objectId);
			}
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:11,代码来源:VersionNumberToCommitTimestamp_8_0.cs

示例3: RebuildIndexForWriter

		protected virtual void RebuildIndexForWriter(LocalObjectContainer container, StatefulBuffer
			 buffer, int objectId)
		{
			ObjectHeader objectHeader = new ObjectHeader(container, buffer);
			ObjectIdContextImpl context = new ObjectIdContextImpl(container.SystemTransaction
				(), buffer, objectHeader, objectId);
			ClassMetadata classMetadata = context.ClassMetadata();
			if (classMetadata.IsStruct())
			{
				// We don't keep version information for structs.
				return;
			}
			if (classMetadata.SeekToField(container.SystemTransaction(), buffer, versionFieldMetadata
				) != HandlerVersion.Invalid)
			{
				long version = ((long)versionFieldMetadata.Read(context));
				if (version != 0)
				{
					LocalTransaction t = (LocalTransaction)container.SystemTransaction();
					t.CommitTimestampSupport().Put(container.SystemTransaction(), objectId, version);
				}
			}
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:23,代码来源:VersionNumberToCommitTimestamp_8_0.cs

示例4: TypesFor

		public static IDictionary TypesFor(LocalObjectContainer db, Sharpen.Util.ISet ids
			)
		{
			IDictionary id2clazzes = new Hashtable();
			ClassMetadataIterator iter = db.ClassCollection().Iterator();
			while (iter.MoveNext())
			{
				for (IEnumerator idIter = ids.GetEnumerator(); idIter.MoveNext(); )
				{
					int id = ((int)idIter.Current);
					ClassMetadata clazz = iter.CurrentClass();
					BTree btree = BTreeClassIndexStrategy.Btree(clazz);
					if (btree.Search(db.SystemTransaction(), id) != null)
					{
						Sharpen.Util.ISet clazzes = ((Sharpen.Util.ISet)id2clazzes[id]);
						if (clazzes == null)
						{
							clazzes = new HashSet();
							id2clazzes[id] = clazzes;
						}
						clazzes.Add(clazz);
					}
				}
			}
			IDictionary id2clazz = new Hashtable();
			for (IEnumerator idIter = id2clazzes.Keys.GetEnumerator(); idIter.MoveNext(); )
			{
				int id = ((int)idIter.Current);
				Sharpen.Util.ISet clazzes = ((Sharpen.Util.ISet)id2clazzes[id]);
				ClassMetadata mostSpecific = null;
				for (IEnumerator curClazzIter = clazzes.GetEnumerator(); curClazzIter.MoveNext(); )
				{
					ClassMetadata curClazz = ((ClassMetadata)curClazzIter.Current);
					for (IEnumerator cmpClazzIter = clazzes.GetEnumerator(); cmpClazzIter.MoveNext(); )
					{
						ClassMetadata cmpClazz = ((ClassMetadata)cmpClazzIter.Current);
						if (curClazz.Equals(cmpClazz._ancestor))
						{
							goto OUTER_continue;
						}
					}
					mostSpecific = curClazz;
					break;
OUTER_continue: ;
				}
OUTER_break: ;
				id2clazz[id] = mostSpecific;
			}
			return id2clazz;
		}
开发者ID:erdincay,项目名称:db4o,代码行数:50,代码来源:ConsistencyCheckerUtil.cs

示例5: Convert

		public virtual void Convert(LocalObjectContainer container, int classIndexId, BTree
			 bTree)
		{
			Transaction trans = container.SystemTransaction();
			ByteArrayBuffer reader = container.ReadBufferById(trans, classIndexId);
			if (reader == null)
			{
				return;
			}
			int entries = reader.ReadInt();
			for (int i = 0; i < entries; i++)
			{
				bTree.Add(trans, reader.ReadInt());
			}
		}
开发者ID:erdincay,项目名称:db4o,代码行数:15,代码来源:ClassIndexesToBTrees_5_5.cs

示例6: ReadIdentity

		public override void ReadIdentity(LocalObjectContainer container)
		{
			_variablePart.ReadIdentity((LocalTransaction)container.SystemTransaction());
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:4,代码来源:NewFileHeaderBase.cs

示例7: SlotEntryToZeroes

		internal static void SlotEntryToZeroes(LocalObjectContainer file, int address)
		{
			StatefulBuffer writer = new StatefulBuffer(file.SystemTransaction(), address, SlotLength
				());
			for (int i = 0; i < IntsInSlot; i++)
			{
				writer.WriteInt(0);
			}
			writer.WriteEncrypt();
		}
开发者ID:erdincay,项目名称:db4o,代码行数:10,代码来源:AbstractFreespaceManager.cs

示例8: Reindex

		private void Reindex(LocalObjectContainer container)
		{
			ClassMetadata clazz = ContainingClass();
			if (RebuildIndexForClass(container, clazz))
			{
				container.SystemTransaction().Commit();
			}
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:8,代码来源:FieldMetadata.cs

示例9: RebuildIndexForWriter

		protected virtual void RebuildIndexForWriter(LocalObjectContainer stream, StatefulBuffer
			 writer, int objectId)
		{
			ObjectHeader oh = new ObjectHeader(stream, writer);
			object obj = ReadIndexEntryForRebuild(writer, oh);
			AddIndexEntry(stream.SystemTransaction(), objectId, obj);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:7,代码来源:FieldMetadata.cs

示例10: RebuildIndexForObject

		/// <exception cref="Db4objects.Db4o.Internal.FieldIndexException"></exception>
		protected virtual void RebuildIndexForObject(LocalObjectContainer stream, ClassMetadata
			 classMetadata, int objectId)
		{
			StatefulBuffer writer = stream.ReadStatefulBufferById(stream.SystemTransaction(), 
				objectId);
			if (writer != null)
			{
				RebuildIndexForWriter(stream, writer, objectId);
			}
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:11,代码来源:FieldMetadata.cs

示例11: BTreeUsage

		internal static long BTreeUsage(LocalObjectContainer db, BTree btree, ISlotMap slotMap
			)
		{
			return BTreeUsage(db.SystemTransaction(), db.IdSystem(), btree, slotMap);
		}
开发者ID:erdincay,项目名称:db4o,代码行数:5,代码来源:FileUsageStatsCollector.cs

示例12: RebuildIndexForObject

 /// <exception cref="Db4objects.Db4o.Internal.FieldIndexException"></exception>
 protected override void RebuildIndexForObject(LocalObjectContainer container, ClassMetadata
     classMetadata, int objectId)
 {
     var slot = container.SystemTransaction().IdSystem().CurrentSlot(objectId);
     var data = ReadDatabaseIdentityIDAndUUID(
         container, classMetadata, slot, true);
     if (null == data)
     {
         return;
     }
     AddIndexEntry(container.LocalSystemTransaction(), objectId, data.uuid);
 }
开发者ID:masroore,项目名称:db4o,代码行数:13,代码来源:UUIDFieldMetadata.cs


注:本文中的Db4objects.Db4o.Internal.LocalObjectContainer.SystemTransaction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。