namespace ZB.MOM.WW.MxGateway.Server.Galaxy; /// /// Persists the latest Galaxy Repository browse dataset to disk and reloads /// it at startup. Lets serve last-known /// browse data when the Galaxy database is unreachable on a cold start. /// public interface IGalaxyHierarchySnapshotStore { /// /// Writes to disk, replacing any previous /// snapshot atomically. A no-op when snapshot persistence is disabled. /// /// The browse dataset to persist. /// Token to cancel the asynchronous operation. Task SaveAsync(GalaxyHierarchySnapshot snapshot, CancellationToken cancellationToken); /// /// Reads the persisted Galaxy browse dataset. /// /// Token to cancel the asynchronous operation. /// /// The persisted snapshot, or when none exists, /// persistence is disabled, or the on-disk file uses an unrecognized /// schema version. /// Task TryLoadAsync(CancellationToken cancellationToken); }