public sealed class RealmTransfersEvery transfer this realm is part of — the ones leaving and the ones arriving.
Remarks
The join between Vixen.Live.Transfer's state machines and a running realm. SourceTransfer knows the protocol and nothing about a frame; RealmHost has the frame and knows nothing about the protocol. This is where the two meet, and it is stepped exactly once per update so that a transfer expiring and a player being simulated cannot happen at the same time on two threads.
⚠ It decides nothing about where anybody goes. That is IMapGrain.Place's answer arriving through RealmDirectory, and this only ever holds the machine that the answer is fed into. A realm that chose its own destinations would be a realm making placement decisions with no view of the fleet.
Fields and properties (4)
public TransferBoard ArrivingThe slots held for people on their way here.
public TransferMetrics MetricsWhat transfers are costing this realm.
public IReadOnlyCollection<SourceTransfer> LeavingEverybody currently on their way out.
public int InFlightHow many are in flight, which is the number a drain watches.
Methods (7)
public RealmTransfers(TransferDeadlines? deadlines = null)Builds one.
public SourceTransfer Begin(PlayerKey player, string destination, DateTimeOffset now, string reason = "")Starts moving somebody.
public bool TryGet(PlayerKey player, out SourceTransfer? transfer)The transfer in flight for somebody, if there is one.
public bool IsLeaving(PlayerKey player)Whether somebody is on their way out.
public ReservationRefusal Expect(TransferTicket ticket, long epoch, DateTimeOffset now, int population, ShardCapacity capacity, bool draining)Holds a slot for somebody the orchestrator is sending here.
public bool Forget(PlayerKey player)Forgets a transfer, however it ended.
public IReadOnlyList<SourceTransfer> Step(DateTimeOffset now)One turn of the clock for every transfer this realm is part of.
Used by (4)
- RealmVixen.Live.Realm.Tests
- RealmHostVixen.Live.Realm
- TransferFleetVixen.Live.Realm.Tests
- TransferOracleTestsVixen.Live.Realm.Tests