forked from npgsql/npgsql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReplicationMessage.cs
More file actions
32 lines (27 loc) · 957 Bytes
/
ReplicationMessage.cs
File metadata and controls
32 lines (27 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using NpgsqlTypes;
using System;
namespace Npgsql.Replication;
/// <summary>
/// The common base class for all streaming replication messages
/// </summary>
public abstract class ReplicationMessage
{
/// <summary>
/// The starting point of the WAL data in this message.
/// </summary>
public NpgsqlLogSequenceNumber WalStart { get; private set; }
/// <summary>
/// The current end of WAL on the server.
/// </summary>
public NpgsqlLogSequenceNumber WalEnd { get; private set; }
/// <summary>
/// The server's system clock at the time this message was transmitted, as microseconds since midnight on 2000-01-01.
/// </summary>
public DateTime ServerClock { get; private set; }
private protected void Populate(NpgsqlLogSequenceNumber walStart, NpgsqlLogSequenceNumber walEnd, DateTime serverClock)
{
WalStart = walStart;
WalEnd = walEnd;
ServerClock = serverClock;
}
}