Exemplo n.º 1
0
 public async Task Dispatch <T>(T spatialEvent) where T : SpatialEvent
 {
     var partitionKey = IndexHelper.GetPartitionKeyForPosition(spatialEvent.Position, _config.PartitionSize);
     var partition    = _client.GetGrain <IGridPartitionGrain>(partitionKey);
     await partition.HandleSpatialEvent(spatialEvent);
 }
Exemplo n.º 2
0
 private async Task InsertAt <T>(T spatialGrain, Vector3d position) where T : ISpatialGrain
 {
     var partitionKey = IndexHelper.GetPartitionKeyForPosition(position, _config.PartitionSize);
     var partition    = _client.GetGrain <IGridPartitionGrain>(partitionKey);
     await partition.Add(spatialGrain);
 }