Table of Contents

Struct PointSelector

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

What an operation targets: a backup point (the newest one, or one by its id), or — for a restore only — an LSN or an instant of an archived WAL timeline (#1418), which restores the newest point at or below it and replays the archive up to it.

public readonly struct PointSelector : IEquatable<PointSelector>
Implements
Inherited Members

Remarks

Verify, list and the other point-scoped operations take a point and throw ArgumentException for an archive target: an LSN names no pack.

Properties

BackupId

The selected id; 0 for Latest and for an archive target.

public uint BackupId { get; }

Property Value

uint

IsArchiveTarget

Whether this targets the WAL archive (AtLsn(long, Guid?), AtTime(DateTime, Guid?)) rather than a point.

public bool IsArchiveTarget { get; }

Property Value

bool

IsLatest

Whether this selects the newest point.

public bool IsLatest { get; }

Property Value

bool

IsTimeTarget

Whether this is an AtTime(DateTime, Guid?) target.

public bool IsTimeTarget { get; }

Property Value

bool

Latest

The point with the highest id in the store.

public static PointSelector Latest { get; }

Property Value

PointSelector

Lsn

The target LSN of AtLsn(long, Guid?); 0 otherwise.

public long Lsn { get; }

Property Value

long

TimeUtc

The target instant of AtTime(DateTime, Guid?); MinValue otherwise.

public DateTime TimeUtc { get; }

Property Value

DateTime

TimelineId

The WAL timeline of an archive target; null = the newest.

public Guid? TimelineId { get; }

Property Value

Guid?

Methods

AtLsn(long, Guid?)

The archived WAL up to lsn: the restore ends at the last frame (a transaction, or one fence emission) ending at or below it.

public static PointSelector AtLsn(long lsn, Guid? timeline = null)

Parameters

lsn long

The target LSN (1 or more).

timeline Guid?

The WAL timeline; null = the newest one, walking back to the ancestor that holds lsn.

Returns

PointSelector

AtTime(DateTime, Guid?)

The archived WAL as it was durable at utc, to the archive's time-sample resolution: no transaction durable after it is included, and one durable up to a sample interval before it may be left out.

public static PointSelector AtTime(DateTime utc, Guid? timeline = null)

Parameters

utc DateTime

The instant; its Kind must be Utc.

timeline Guid?

The WAL timeline; null = the newest one, walking back to the ancestor that holds the instant.

Returns

PointSelector

ById(uint)

The point whose id is backupId.

public static PointSelector ById(uint backupId)

Parameters

backupId uint

A point id (1 or more).

Returns

PointSelector

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(PointSelector)

public bool Equals(PointSelector other)

Parameters

other PointSelector

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string