Class LockFileManager

java.lang.Object
express.mvp.myra.codec.schema.LockFileManager

public final class LockFileManager extends Object
Reads and writes Myra schema lock files.

Lock files capture stable ids for messages and fields so schema evolution remains deterministic across runs.

  • Method Details

    • load

      public static LockFile load(Path lockFilePath) throws IOException
      Loads a lock file from disk.
      Parameters:
      lockFilePath - the path to the .myra.lock file
      Returns:
      the parsed lock file, or null if the file does not exist
      Throws:
      IOException - if the file cannot be read or parsed
    • save

      public static void save(LockFile lockFile, Path lockFilePath) throws IOException
      Writes a lock file to disk.
      Parameters:
      lockFile - the lock file data to write
      lockFilePath - the destination path
      Throws:
      IOException - if the file cannot be written