Exemple #1
0
 public virtual bool ProcessAtClient()
 {
     var @is = new ByteArrayInputStream(_payLoad._buffer);
     var dispatcherID = PrimitiveCodec.ReadInt(@is);
     var callbackInfos = Decode(@is);
     Container().ThreadPool().Start(ReflectPlatform.SimpleName(GetType()) + ": calling commit callbacks thread"
         , new _IRunnable_111(this, callbackInfos, dispatcherID));
     return true;
 }
		public static long ReadLong(ByteArrayInputStream @in)
		{
			long ret = 0;
			for (int i = 0; i < LongLength; i++)
			{
				ret = (ret << 8) + ((byte)@in.Read() & unchecked((int)(0xff)));
			}
			return ret;
		}
Exemple #3
0
 public virtual CallbackObjectInfoCollections Decode(ByteArrayInputStream @is)
 {
     var added = DecodeObjectInfoCollection(@is, new InternalIDEncoder
         (this));
     var deleted = DecodeObjectInfoCollection(@is, new FrozenObjectInfoEncoder
         (this));
     var updated = DecodeObjectInfoCollection(@is, new InternalIDEncoder
         (this));
     return new CallbackObjectInfoCollections(added, updated, deleted);
 }
Exemple #4
0
 private IObjectInfoCollection DecodeObjectInfoCollection(ByteArrayInputStream @is
     , IObjectInfoEncoder encoder)
 {
     var collection = new Collection4();
     while (true)
     {
         var info = encoder.Decode(@is);
         if (null == info)
         {
             break;
         }
         collection.Add(info);
     }
     return new ObjectInfoCollectionImpl(collection);
 }
Exemple #5
0
			public IObjectInfo Decode(ByteArrayInputStream @is)
			{
				long id = PrimitiveCodec.ReadLong(@is);
				if (id == -1)
				{
					return null;
				}
				long sourceDatabaseId = PrimitiveCodec.ReadLong(@is);
				Db4oDatabase sourceDatabase = null;
				if (sourceDatabaseId > 0)
				{
					sourceDatabase = (Db4oDatabase)this._enclosing.Container().GetByID(this._enclosing
						.Transaction(), sourceDatabaseId);
				}
				long uuidLongPart = PrimitiveCodec.ReadLong(@is);
				long version = PrimitiveCodec.ReadLong(@is);
				return new FrozenObjectInfo(null, id, sourceDatabase, uuidLongPart, version);
			}
Exemple #6
0
 public IObjectInfo Decode(ByteArrayInputStream @is)
 {
     var id = PrimitiveCodec.ReadLong(@is);
     if (id == -1)
     {
         return null;
     }
     return new LazyObjectReference(_enclosing.Transaction(), (int) id);
 }
Exemple #7
0
		public static int ReadInt(ByteArrayInputStream @in)
		{
			return (@in.Read() << 24) | ((@in.Read() & 255) << 16) | ((@in.Read() & 255) << 8
				) | (@in.Read() & 255);
		}
Exemple #8
0
		public virtual CallbackObjectInfoCollections Decode(ByteArrayInputStream @is)
		{
			IObjectInfoCollection added = DecodeObjectInfoCollection(@is, new MCommittedInfo.InternalIDEncoder
				(this));
			IObjectInfoCollection deleted = DecodeObjectInfoCollection(@is, new MCommittedInfo.FrozenObjectInfoEncoder
				(this));
			IObjectInfoCollection updated = DecodeObjectInfoCollection(@is, new MCommittedInfo.InternalIDEncoder
				(this));
			return new CallbackObjectInfoCollections(added, updated, deleted);
		}