Vixen
02b45cc4
csharp
public interface IShardGrain

One realm process, from requested to gone. Doc 27 § Grains' spine.

Read the guide page for this →

Remarks

Keyed by the ShardId. The state machine is Requested → Starting → Ready → Draining → Stopping → Stopped, with Failed and Lost off the side of it, and every transition below is one edge of that.

Methods (8)

  • Task<ShardReport> Report()

    What this shard is.

  • Task Requested(ShardKey key, ShardCapacity capacity)

    A decision that this shard should exist.

  • Task Starting(RealmInstanceId instance, RealmEndpoint endpoint)

    The placement backend created something.

  • Task Ready(RealmEndpoint endpoint)

    The realm loaded its map and is accepting sessions.

  • Task<ShardState> Heartbeat(ShardHeartbeat sample)

    The two-second sample, and the shard's own state back.

  • Task Drain(string reason)

    Stop taking arrivals and move everyone out at safe moments.

  • Task Stopped()

    It ended the way it was asked to.

  • Task Lost(string detail)

    It went away without being asked.

Used by (7)

  • ClusterGrainsVixen.Live.Realm.Cluster
  • FakeClusterVixen.Live.Realm.Cluster.Tests
  • FakeShardVixen.Live.Realm.Cluster.Tests
  • IRealmGrainsVixen.Live.Realm.Cluster
  • MapGrainVixen.Live.Orchestrator
  • RealmClusterVixen.Live.Realm.Cluster
  • ShardGrainVixen.Live.Orchestrator