private object EntityStoppedFromBinary(byte[] binary) { using (var stream = new MemoryStream(binary, false)) { var msg = EntityStopped.ParseFrom(stream); return(new Shard.EntityStopped(msg.EntityId)); } }
/// <summary> /// TBD /// </summary> /// <param name="evt">TBD</param> protected void PassivateCompleted(EntityStopped evt) { var id = evt.EntityId; Log.Debug("Entity stopped [{0}]", id); var entity = RefById[id]; IdByRef = IdByRef.Remove(entity); RefById = RefById.Remove(id); State = new ShardState(State.Entries.Remove(id)); MessageBuffers = MessageBuffers.Remove(id); }
/// <summary> /// TBD /// </summary> /// <param name="evt">TBD</param> protected void PassivateCompleted(EntityStopped evt) { Log.Debug("Entity stopped after passivation [{0}]", evt.EntityId); State = new ShardState(State.Entries.Remove(evt.EntityId)); MessageBuffers = MessageBuffers.Remove(evt.EntityId); }
private EntityStopped EntityStoppedToProto(Shard.EntityStopped entityStopped) { return(EntityStopped.CreateBuilder().SetEntityId(entityStopped.EntityId).Build()); }