Table of Contents

Class WorldServerSystemRuntimeData

Namespace
FishMMO.Server.Implementation.World.WorldServer
Assembly
FishMMO.Server.dll

Runtime data container for world server instance state. Manages world server ID and lock status separately from WorldServerSystem logic.

public class WorldServerSystemRuntimeData : RuntimeDataContainer, IRuntimeDataContainer<INetworkManagerWrapper, ServerManager, NetworkConnection, IRuntimeDataContainer>, IServerComponent<INetworkManagerWrapper, ServerManager, NetworkConnection, IRuntimeDataContainer>, IWorldServerSystemRuntimeData, IRuntimeDataContainer, IServerComponent
Inheritance
WorldServerSystemRuntimeData
Implements
Inherited Members

Properties

ID

Database ID for this world server instance.

public long ID { get; set; }

Property Value

long

IsLocked

Indicates whether the world server is locked (not accepting new connections).

public bool IsLocked { get; set; }

Property Value

bool

ShutdownAtUtc

When this world stops, or null when no shutdown is scheduled.

public DateTime? ShutdownAtUtc { get; set; }

Property Value

DateTime?

Remarks

Also adopted from the row, so a shutdown scheduled from anywhere — an in-game /admin shutdown, the Discord bot, psql — reaches this process within two pulses (a pulse's reading is adopted on the next one). It says whether and when a shutdown is scheduled; the countdown itself runs on ShutdownCountdown, from the seconds left as the database measured them, so every process serving this world stops at the same moment whatever its own clock says.

Methods

Clear()

Clears the world server state.

public override void Clear()

EndPulse()

Atomically transitions the pulse gate from in-flight back to idle.

public void EndPulse()

InitializeOnce()

Initializes the world server runtime data container.

public override ServerComponentInitializationStatus InitializeOnce()

Returns

ServerComponentInitializationStatus

OnDeinitialize()

Deinitializes the world server runtime data container.

protected override void OnDeinitialize()

TryBeginPulse()

Atomically transitions the pulse gate from idle to in-flight. Returns true if this call won the race; false if a pulse is already in flight.

public bool TryBeginPulse()

Returns

bool