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; }
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); }
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); }
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); }
public IObjectInfo Decode(ByteArrayInputStream @is) { var id = PrimitiveCodec.ReadLong(@is); if (id == -1) { return null; } return new LazyObjectReference(_enclosing.Transaction(), (int) id); }
public static int ReadInt(ByteArrayInputStream @in) { return (@in.Read() << 24) | ((@in.Read() & 255) << 16) | ((@in.Read() & 255) << 8 ) | (@in.Read() & 255); }
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); }