Пример #1
0
		/// <summary>This readIndexEntry method reads from the parent slot.</summary>
		/// <remarks>This readIndexEntry method reads from the parent slot.</remarks>
		/// <exception cref="Db4objects.Db4o.CorruptionException"></exception>
		/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception>
		public virtual object ReadIndexEntryFromObjectSlot(MarshallerFamily mf, StatefulBuffer
			 buffer)
		{
			int payLoadOffSet = buffer.ReadInt();
			int length = buffer.ReadInt();
			if (payLoadOffSet == 0)
			{
				return null;
			}
			return buffer.ReadPayloadWriter(payLoadOffSet, length);
		}
		public override void CompleteInterruptedTransaction(int transactionId1, int transactionId2
			)
		{
			if (transactionId1 <= 0 || transactionId1 != transactionId2)
			{
				return;
			}
			StatefulBuffer bytes = new StatefulBuffer(_container.SystemTransaction(), transactionId1
				, Const4.IntLength);
			bytes.Read();
			int length = bytes.ReadInt();
			if (length > 0)
			{
				bytes = new StatefulBuffer(_container.SystemTransaction(), transactionId1, length
					);
				bytes.Read();
				bytes.IncrementOffset(Const4.IntLength);
				ReadWriteSlotChanges(bytes);
			}
			_container.WriteTransactionPointer(0);
			FlushDatabaseFile();
		}
Пример #3
0
		// FIXME: This code has not been called in any test case when the 
		//        new ArrayMarshaller was written.
		//        Apparently it only frees slots.
		//        For now the code simply returns without freeing.
		/// <param name="classPrimitive"></param>
		public void DeletePrimitiveEmbedded(StatefulBuffer buffer, PrimitiveTypeMetadata 
			classPrimitive)
		{
			buffer.ReadInt();
			//int address = a_bytes.readInt();
			buffer.ReadInt();
		}
Пример #4
0
		/// <exception cref="Db4objects.Db4o.CorruptionException"></exception>
		/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception>
		public override object ReadIndexEntryFromObjectSlot(MarshallerFamily mf, StatefulBuffer
			 buffer)
		{
			return buffer.Container().ReadWriterByAddress(buffer.Transaction(), buffer.ReadInt
				(), buffer.ReadInt());
		}
Пример #5
0
 	public object ReadIndexEntryFromObjectSlot(MarshallerFamily mf, StatefulBuffer statefulBuffer)
 	{
 		return new IndexEntry(statefulBuffer.ReadInt(), statefulBuffer.ReadLong());
 	}