Table of Contents

Interface IWorldServerSystemRuntimeData

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

Runtime data container for world server instance state. Tracks world server ID and lock status.

public interface IWorldServerSystemRuntimeData : IRuntimeDataContainer, IServerComponent

Properties

ID

Database ID for this world server instance.

long ID { get; set; }

Property Value

long

IsLocked

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

bool IsLocked { get; set; }

Property Value

bool

Remarks

Adopted from the database row on every pulse rather than owned here; the row is what an operator sets. A locked world still admits accounts above Player, so locking it for maintenance does not lock out the people doing the maintenance.

ShutdownAtUtc

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

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

EndPulse()

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

void EndPulse()

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.

bool TryBeginPulse()

Returns

bool