Class SceneChannelSystemRuntimeData
- Namespace
- FishMMO.Server.Implementation.World.SceneServer
- Assembly
- FishMMO.Server.dll
Runtime data container for the SceneChannelSystem. Holds all mutable state: ingress guard, per-connection cooldowns, and cleanup timers.
public class SceneChannelSystemRuntimeData : RuntimeDataContainer, IRuntimeDataContainer<INetworkManagerWrapper, ServerManager, NetworkConnection, IRuntimeDataContainer>, IServerComponent<INetworkManagerWrapper, ServerManager, NetworkConnection, IRuntimeDataContainer>, ISceneChannelSystemRuntimeData, IRuntimeDataContainer, IServerComponent
- Inheritance
-
SceneChannelSystemRuntimeData
- Implements
-
IRuntimeDataContainer<INetworkManagerWrapper, ServerManager, NetworkConnection, IRuntimeDataContainer>
- Inherited Members
Properties
AvailableSceneCache
Cache of FetchAvailableAsync results, keyed by world server ID and scene name.
Entries expire after a configurable TTL to reduce database polling.
public TimedCache<string, IReadOnlyList<SceneData>> AvailableSceneCache { get; set; }
Property Value
Remarks
The world server must be part of the key: a scene server hosts scenes for every world
server, so a key of scene name alone collides between them. See
SceneChannelSystem.BuildAvailableSceneCacheKey.
ChannelSwitchCooldownByClientId
Per-connection channel switch cooldown tracker. Maps client connection ID to the UTC time of their last channel switch.
public Dictionary<int, DateTime> ChannelSwitchCooldownByClientId { get; }
Property Value
IngressGuard
Per-connection, per-operation ingress guard for DoS protection on channel broadcasts.
public IngressGuard IngressGuard { get; }
Property Value
NextCooldownCleanup
Time remaining (in seconds) until the next cooldown dictionary cleanup sweep.
public float NextCooldownCleanup { get; set; }
Property Value
SceneServerAddressCache
Cache of scene server addresses keyed by scene server ID. Addresses change infrequently, so a longer TTL is appropriate.
public TimedCache<long, ushort> SceneServerAddressCache { get; set; }
Property Value
Methods
Clear()
Clears all tracked state without releasing references.
public override void Clear()
InitializeOnce()
Initializes the runtime data, creating the ingress guard and cooldown dictionary.
public override ServerComponentInitializationStatus InitializeOnce()
Returns
OnDeinitialize()
Deinitializes the runtime data, releasing all references.
protected override void OnDeinitialize()