コード例 #1
0
ファイル: Shard.cs プロジェクト: youyouzaileizi/akka.net
 private static void HandleStartEntityAck <TShard>(this TShard shard, ShardRegion.StartEntityAck ack) where TShard : IShard
 {
     if (ack.ShardId != shard.ShardId && shard.State.Entries.Contains(ack.EntityId))
     {
         shard.Log.Debug("Entity [{0}] previously owned by shard [{1}] started in shard [{2}]", ack.EntityId, shard.ShardId, ack.ShardId);
         shard.ProcessChange(new Shard.EntityStopped(ack.EntityId), _ =>
         {
             shard.State          = new Shard.ShardState(shard.State.Entries.Remove(ack.EntityId));
             shard.MessageBuffers = shard.MessageBuffers.Remove(ack.EntityId);
         });
     }
 }
コード例 #2
0
ファイル: Shard.cs プロジェクト: icewwn/akka.net
 private void HandleStartEntityAck(ShardRegion.StartEntityAck ack)
 {
     if (ack.ShardId != ShardId && State.Entries.Contains(ack.EntityId))
     {
         Log.Debug("Entity [{0}] previously owned by shard [{1}] started in shard [{2}]", ack.EntityId, ShardId, ack.ShardId);
         ProcessChange(new EntityStopped(ack.EntityId), _ =>
         {
             State          = new ShardState(State.Entries.Remove(ack.EntityId));
             MessageBuffers = MessageBuffers.Remove(ack.EntityId);
         });
     }
 }