Table of Contents

Struct RealmR1

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

One entry of the persisted realm catalog (Realms decision D-1): the IDENTITY of a named realm — the fields that decide which cell a position files into — so a later open can rebuild the realm's spatial layer before the application has said anything, and refuse a registration that would re-map every entity of it.

[Component("Typhon.Schema.Realm", 1)]
public struct RealmR1
Inherited Members

Remarks

Realm 0 is not here. It keeps its single-world record (spatial.GridConfig), so a database that never names a realm is byte-for-byte what it was. The catalog table is created the first time a realm other than 0 is registered.

Identity only. Policy (WhenUnobserved, divisors) and the grid's tuning knobs decide when things run, never where an entity is filed, so they are the application's to supply at each open — as for the realm-0 record.

Fields

CellSize

Cell edge length.

public double CellSize

Field Value

double

Generation

Incarnation of the id: 0 the first time an id is registered, and one more than the retired row's each time it is registered again.

public int Generation

Field Value

int

Remarks

It advances whenever a retired or durably removed id is registered again — across an open, or within a session (#1641). An id unregistered during a session is registrable again once its emptiness is durable: a checkpoint that started after the fence that removed the realm has completed (RLM-06). Before that, a crash would replay the old realm's entities into the new one. So a consumer that keys on (id, generation) — the identity 12-realms § 1.1 defines — must expect it to change while the server runs.

Read it with Realms.GenerationOf(id); it is what the REALM block puts on the wire.

Id

The realm id.

public int Id

Field Value

int

MigrationHysteresisRatio

The cell-crossing hysteresis band, as a fraction of the cell (part of CC-02's contract, hence of identity).

public float MigrationHysteresisRatio

Field Value

float

SchemaName

Fully-qualified schema name of this record ("Typhon.Schema.Realm").

public const string SchemaName = "Typhon.Schema.Realm"

Field Value

string

State

Lifecycle state (Realms D5): StateLive, StateClosing (unregistered and not yet proven empty at an open; a registration in the same session reuses it once the removal is durable) or StateRetired (empty at an open; the id is free and a later registration reuses this row).

public int State

Field Value

int

StateClosing

Unregistered; reopened as Closing until an open finds it empty after recovery.

public const int StateClosing = 1

Field Value

int

StateLive

A registered realm.

public const int StateLive = 0

Field Value

int

StateRetired

Retired: its id may be registered again.

public const int StateRetired = 2

Field Value

int

WorldMaxX

World bounds, maximum corner.

public double WorldMaxX

Field Value

double

WorldMaxY

See WorldMaxX.

public double WorldMaxY

Field Value

double

WorldMaxZ

See WorldMaxX.

public double WorldMaxZ

Field Value

double

WorldMinX

World bounds, minimum corner.

public double WorldMinX

Field Value

double

WorldMinY

See WorldMinX.

public double WorldMinY

Field Value

double

WorldMinZ

See WorldMinX.

public double WorldMinZ

Field Value

double