Reformat/cleanup
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m10s
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m10s
This commit is contained in:
@@ -1,49 +1,47 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ZB.MOM.WW.CBDDC.Persistence.Snapshot;
|
||||
|
||||
/// <summary>
|
||||
/// Root DTO for CBDDC snapshots (JSON format).
|
||||
/// </summary>
|
||||
namespace ZB.MOM.WW.CBDDC.Persistence.Snapshot;
|
||||
|
||||
/// <summary>
|
||||
/// Root DTO for CBDDC snapshots (JSON format).
|
||||
/// </summary>
|
||||
public class SnapshotDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the snapshot format version.
|
||||
/// Gets or sets the snapshot format version.
|
||||
/// </summary>
|
||||
public string Version { get; set; } = "1.0";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the snapshot creation timestamp.
|
||||
/// Gets or sets the snapshot creation timestamp.
|
||||
/// </summary>
|
||||
public string CreatedAt { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the source node identifier.
|
||||
/// Gets or sets the source node identifier.
|
||||
/// </summary>
|
||||
public string NodeId { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the serialized document records.
|
||||
/// Gets or sets the serialized document records.
|
||||
/// </summary>
|
||||
public List<DocumentDto> Documents { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the serialized oplog entries.
|
||||
/// Gets or sets the serialized oplog entries.
|
||||
/// </summary>
|
||||
public List<OplogDto> Oplog { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the snapshot metadata entries.
|
||||
/// Gets or sets the snapshot metadata entries.
|
||||
/// </summary>
|
||||
public List<SnapshotMetadataDto> SnapshotMetadata { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the remote peer configurations in the snapshot.
|
||||
/// Gets or sets the remote peer configurations in the snapshot.
|
||||
/// </summary>
|
||||
public List<RemotePeerDto> RemotePeers { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets peer oplog confirmation records in the snapshot.
|
||||
/// Gets or sets peer oplog confirmation records in the snapshot.
|
||||
/// </summary>
|
||||
public List<PeerOplogConfirmationDto> PeerConfirmations { get; set; } = new();
|
||||
}
|
||||
@@ -51,37 +49,37 @@ public class SnapshotDto
|
||||
public class DocumentDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the document collection name.
|
||||
/// Gets or sets the document collection name.
|
||||
/// </summary>
|
||||
public string Collection { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the document key.
|
||||
/// Gets or sets the document key.
|
||||
/// </summary>
|
||||
public string Key { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the serialized document payload.
|
||||
/// Gets or sets the serialized document payload.
|
||||
/// </summary>
|
||||
public string? JsonData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the document is deleted.
|
||||
/// Gets or sets a value indicating whether the document is deleted.
|
||||
/// </summary>
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the HLC wall-clock component.
|
||||
/// Gets or sets the HLC wall-clock component.
|
||||
/// </summary>
|
||||
public long HlcWall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the HLC logical counter component.
|
||||
/// Gets or sets the HLC logical counter component.
|
||||
/// </summary>
|
||||
public int HlcLogic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the HLC node component.
|
||||
/// Gets or sets the HLC node component.
|
||||
/// </summary>
|
||||
public string HlcNode { get; set; } = "";
|
||||
}
|
||||
@@ -89,47 +87,47 @@ public class DocumentDto
|
||||
public class OplogDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the collection associated with the operation.
|
||||
/// Gets or sets the collection associated with the operation.
|
||||
/// </summary>
|
||||
public string Collection { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the key associated with the operation.
|
||||
/// Gets or sets the key associated with the operation.
|
||||
/// </summary>
|
||||
public string Key { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the operation code.
|
||||
/// Gets or sets the operation code.
|
||||
/// </summary>
|
||||
public int Operation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the serialized operation payload.
|
||||
/// Gets or sets the serialized operation payload.
|
||||
/// </summary>
|
||||
public string? JsonData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the HLC wall-clock component.
|
||||
/// Gets or sets the HLC wall-clock component.
|
||||
/// </summary>
|
||||
public long HlcWall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the HLC logical counter component.
|
||||
/// Gets or sets the HLC logical counter component.
|
||||
/// </summary>
|
||||
public int HlcLogic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the HLC node component.
|
||||
/// Gets or sets the HLC node component.
|
||||
/// </summary>
|
||||
public string HlcNode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the current entry hash.
|
||||
/// Gets or sets the current entry hash.
|
||||
/// </summary>
|
||||
public string Hash { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the previous entry hash.
|
||||
/// Gets or sets the previous entry hash.
|
||||
/// </summary>
|
||||
public string? PreviousHash { get; set; }
|
||||
}
|
||||
@@ -137,22 +135,22 @@ public class OplogDto
|
||||
public class SnapshotMetadataDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the node identifier.
|
||||
/// Gets or sets the node identifier.
|
||||
/// </summary>
|
||||
public string NodeId { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the HLC wall-clock component.
|
||||
/// Gets or sets the HLC wall-clock component.
|
||||
/// </summary>
|
||||
public long HlcWall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the HLC logical counter component.
|
||||
/// Gets or sets the HLC logical counter component.
|
||||
/// </summary>
|
||||
public int HlcLogic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the metadata hash.
|
||||
/// Gets or sets the metadata hash.
|
||||
/// </summary>
|
||||
public string Hash { get; set; } = "";
|
||||
}
|
||||
@@ -160,22 +158,22 @@ public class SnapshotMetadataDto
|
||||
public class RemotePeerDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the remote node identifier.
|
||||
/// Gets or sets the remote node identifier.
|
||||
/// </summary>
|
||||
public string NodeId { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the remote peer address.
|
||||
/// Gets or sets the remote peer address.
|
||||
/// </summary>
|
||||
public string Address { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the peer type.
|
||||
/// Gets or sets the peer type.
|
||||
/// </summary>
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the peer is enabled.
|
||||
/// Gets or sets a value indicating whether the peer is enabled.
|
||||
/// </summary>
|
||||
public bool IsEnabled { get; set; }
|
||||
}
|
||||
@@ -183,37 +181,37 @@ public class RemotePeerDto
|
||||
public class PeerOplogConfirmationDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the tracked peer node identifier.
|
||||
/// Gets or sets the tracked peer node identifier.
|
||||
/// </summary>
|
||||
public string PeerNodeId { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the source node identifier.
|
||||
/// Gets or sets the source node identifier.
|
||||
/// </summary>
|
||||
public string SourceNodeId { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the confirmed HLC wall-clock component.
|
||||
/// Gets or sets the confirmed HLC wall-clock component.
|
||||
/// </summary>
|
||||
public long ConfirmedWall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the confirmed HLC logical counter component.
|
||||
/// Gets or sets the confirmed HLC logical counter component.
|
||||
/// </summary>
|
||||
public int ConfirmedLogic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the confirmed oplog hash.
|
||||
/// Gets or sets the confirmed oplog hash.
|
||||
/// </summary>
|
||||
public string ConfirmedHash { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the last-confirmed timestamp in Unix milliseconds.
|
||||
/// Gets or sets the last-confirmed timestamp in Unix milliseconds.
|
||||
/// </summary>
|
||||
public long LastConfirmedUtcMs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the tracked peer is active.
|
||||
/// Gets or sets a value indicating whether the tracked peer is active.
|
||||
/// </summary>
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user