private void HandleShardRegionQuery(IShardQuery query) { if (query is GetCurrentShardState) { _context.Sender.Tell(new CurrentShardState(ShardId, RefById.Keys.ToImmutableHashSet())); } else if (query is GetShardStats) { _context.Sender.Tell(new ShardStats(ShardId, State.Entries.Count)); } }
private void HandleShardRegionQuery(IShardQuery query) { if (query is GetCurrentShardState) { Sender.Tell(new CurrentShardState(ShardId, RefById.Keys.ToArray())); } else if (query is GetShardStats) { Sender.Tell(new ShardStats(ShardId, State.Entries.Count)); } }
private void HandleShardRegionQuery(IShardQuery query) { switch (query) { case GetCurrentShardState _: _context.Sender.Tell(new CurrentShardState(ShardId, RefById.Keys.ToImmutableHashSet())); break; case GetShardStats _: _context.Sender.Tell(new ShardStats(ShardId, State.Entries.Count)); break; } }