chore(m2): 保存功能验收及后续清理前检查点
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
@@ -15,16 +16,23 @@ namespace game.PlayerDataStorage
|
||||
public int? StatusCode { get; }
|
||||
// Only a successful Get has Data. Failure must never look like an empty save.
|
||||
public IReadOnlyDictionary<string, string> Data { get; }
|
||||
// Null means the response did not supply timestamp metadata; never substitute read time.
|
||||
public IReadOnlyDictionary<string, DateTime> UpdatedAtUtc
|
||||
{
|
||||
get;
|
||||
}
|
||||
// A failed write that entered the transport may already have reached the server.
|
||||
// This is conservative, including HTTP failures. Do not blindly replay the write.
|
||||
public bool MayHaveCommitted { get; }
|
||||
|
||||
internal PlayerKVResult(PlayerKVError error, int? statusCode = null,
|
||||
Dictionary<string, string> data = null, bool mayHaveCommitted = false)
|
||||
Dictionary<string, string> data = null, bool mayHaveCommitted = false,
|
||||
Dictionary<string, DateTime> updatedAtUtc = null)
|
||||
{
|
||||
Error = error;
|
||||
StatusCode = statusCode;
|
||||
Data = data == null ? null : new ReadOnlyDictionary<string, string>(data);
|
||||
UpdatedAtUtc = updatedAtUtc == null ? null : new ReadOnlyDictionary<string, DateTime>(updatedAtUtc);
|
||||
MayHaveCommitted = mayHaveCommitted;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user