Package dev.despical.mazeengine.storage


package dev.despical.mazeengine.storage
Persistent maze records, graph validation, and temporary-file replacement.

MazeRepository stores one YAML document per normalized identifier, including world identity, owner, origin, graph, portals, frozen preset, lifecycle state, and custom teleport point. Invalid schemas, malformed graphs, and overlapping saved regions abort loading instead of silently losing occupied maze areas.

MazeRecord replacements describe state transitions without mutating retained values. AtomicFiles requests atomic replacement and provides a fallback for filesystems that do not support it. Operation recovery and live world changes are coordinated by services after repository validation.

  • Class
    Description
    Writes saved documents through temporary files and destination replacement.
    Retains the saved state needed to manage and reconstruct one maze.
    Describes the saved record's preparation, mutation, and recovery lifecycle.
    Persists one validated YAML document per saved maze.
    Stores a saved custom arrival position and facing in a specific world.