public void Check() { using (ListComponent <long> list = EntityFactory.Create <ListComponent <long> >(Domain)) { long timeNow = TimeHelper.CurrentLocalMilliseconds(); foreach ((long key, Entity value) in Children) { ActorLocationSender actorLocationMessageSender = (ActorLocationSender)value; if (timeNow > actorLocationMessageSender.LastSendOrRecvTime + TIMEOUT_TIME) { list.List.Add(key); } } foreach (long id in list.List) { Remove(id); } } }
public async Task <IActorResponse> Call(long entityId, IActorLocationRequest message) { ActorLocationSender actorLocationSender = Get(entityId); return(await actorLocationSender.Call(message)); }
public void Send(long entityId, IActorLocationMessage message) { ActorLocationSender actorLocationSender = Get(entityId); actorLocationSender.Send(message); }