Table of Contents

Class ServerAdminData

Namespace
FishMMO.Database.Data
Assembly
FishMMO-DB.dll

One server process, as an operator needs to see it.

public sealed class ServerAdminData
Inheritance
ServerAdminData
Inherited Members

Remarks

One type for all three tiers rather than three near-identical ones. A login server has no character count and no control columns, so those are simply zero and null for it — which is honest, because the reason they are absent is that a login server has no players on it and cannot be locked, not that the panel failed to read them.

Staleness is not stored and is not decided here. Only LastPulse is a fact; whether that counts as dead depends on the pulse interval the deployment runs, so the caller is given the age and the threshold and makes the call. A boolean baked into the row would be a judgement frozen at read time.

The ages are measured by the database, never by the reader. PulseAgeSeconds and ShutdownInSeconds are computed inside the statement that read the row, against the clock that stamped LastPulse. The panel used to subtract the stamps from its own DateTime.UtcNow, so a panel host running a minute fast marked every healthy server stale and one running slow hid a dead one, which is the only thing the board's staleness exists to show.

Properties

Address

Where it listens.

public string Address { get; set; }

Property Value

string

CharacterCount

Players it is carrying. Always zero for a login server.

public int CharacterCount { get; set; }

Property Value

int

ID

Primary key, within its tier.

public long ID { get; set; }

Property Value

long

Kind

Which tier: login, world or scene.

public string Kind { get; set; }

Property Value

string

LastPulse

When it last said it was alive.

public DateTime LastPulse { get; set; }

Property Value

DateTime

Locked

Whether it is refusing new logins above Player.

public bool Locked { get; set; }

Property Value

bool

Name

The name the process registered under.

public string Name { get; set; }

Property Value

string

Port

The port it listens on.

public int Port { get; set; }

Property Value

int

PulseAgeSeconds

Seconds since LastPulse, measured by the database clock at the read. Never negative.

public double PulseAgeSeconds { get; set; }

Property Value

double

ShutdownAtUtc

When it is due to shut down, or null.

public DateTime? ShutdownAtUtc { get; set; }

Property Value

DateTime?

ShutdownInSeconds

Seconds until ShutdownAtUtc, measured by the database clock at the read; zero or negative once the deadline has passed. Null exactly when no shutdown is scheduled.

public double? ShutdownInSeconds { get; set; }

Property Value

double?

Remarks

Not clamped: a deadline that has passed while the row still carries it means the server has not acted on it, and the board says so rather than showing zero.

TimeCreated

When the row was created, which is when the process started.

public DateTime TimeCreated { get; set; }

Property Value

DateTime