Class Checkpoint.Writer
java.lang.Object
com.quantfinlib.persist.Checkpoint.Writer
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
Checkpoint
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Commits: temp file beside the target, then atomic rename over it (plain replace on filesystems without atomic rename — see the class javadoc's durability caveat).section(String name, Checkpoint.StateWriter body) Serializes one model's state undername.
-
Method Details
-
section
Serializes one model's state undername. A duplicate name or a throwing body marks the writer failed: close() then commits nothing, so a half-written model can never replace a good file.- Throws:
IOException
-
close
Commits: temp file beside the target, then atomic rename over it (plain replace on filesystems without atomic rename — see the class javadoc's durability caveat).- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-