Table of Contents

Class BackupRetentionPlan

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

What a retention would do, or did: the kept points, the compactions it runs first, then the packs it deletes.

public sealed record BackupRetentionPlan : IEquatable<BackupRetentionPlan>
Inheritance
BackupRetentionPlan
Implements
Inherited Members

Constructors

BackupRetentionPlan(IReadOnlyList<uint>, IReadOnlyList<uint>, IReadOnlyList<uint>, IReadOnlyList<string>, uint, long, long, BackupRetentionBlock, string, string)

What a retention would do, or did: the kept points, the compactions it runs first, then the packs it deletes.

public BackupRetentionPlan(IReadOnlyList<uint> Kept, IReadOnlyList<uint> Removed, IReadOnlyList<uint> Compactions, IReadOnlyList<string> PackDeletions, uint CutoffId, long BytesBefore, long BytesAfterAtMost, BackupRetentionBlock Blocked, string BlockedReason, string Fingerprint)

Parameters

Kept IReadOnlyList<uint>

The points kept, ascending.

Removed IReadOnlyList<uint>

The points whose packs are deleted (restorable or not), ascending.

Compactions IReadOnlyList<uint>

The points compacted before any delete, ascending.

PackDeletions IReadOnlyList<string>

The pack files deleted, in delete order (descending id: a crash part-way leaves every listed point restorable).

CutoffId uint

The oldest kept point (K); 0 when nothing is kept.

BytesBefore long

The store's pack bytes now.

BytesAfterAtMost long

An upper bound of the pack bytes once applied: the packs the kept points resolve through now (a compacted base holds each page of its chain once, so it is no larger than the packs it replaces plus its index).

Blocked BackupRetentionBlock

The limit it could not meet, or None.

BlockedReason string

Why, in one sentence; null when not blocked.

Fingerprint string

A CRC of the deletions and compactions: ApplyRetention(string, BackupRetentionPolicy, BackupRetentionPlan, BackupLifecycleOptions) refuses a plan that would now delete a pack the approved one did not list.

Properties

Blocked

The limit it could not meet, or None.

public BackupRetentionBlock Blocked { get; init; }

Property Value

BackupRetentionBlock

BlockedReason

Why, in one sentence; null when not blocked.

public string BlockedReason { get; init; }

Property Value

string

BytesAfterAtMost

An upper bound of the pack bytes once applied: the packs the kept points resolve through now (a compacted base holds each page of its chain once, so it is no larger than the packs it replaces plus its index).

public long BytesAfterAtMost { get; init; }

Property Value

long

BytesBefore

The store's pack bytes now.

public long BytesBefore { get; init; }

Property Value

long

Compactions

The points compacted before any delete, ascending.

public IReadOnlyList<uint> Compactions { get; init; }

Property Value

IReadOnlyList<uint>

CutoffId

The oldest kept point (K); 0 when nothing is kept.

public uint CutoffId { get; init; }

Property Value

uint

Fingerprint

A CRC of the deletions and compactions: ApplyRetention(string, BackupRetentionPolicy, BackupRetentionPlan, BackupLifecycleOptions) refuses a plan that would now delete a pack the approved one did not list.

public string Fingerprint { get; init; }

Property Value

string

Kept

The points kept, ascending.

public IReadOnlyList<uint> Kept { get; init; }

Property Value

IReadOnlyList<uint>

PackDeletions

The pack files deleted, in delete order (descending id: a crash part-way leaves every listed point restorable).

public IReadOnlyList<string> PackDeletions { get; init; }

Property Value

IReadOnlyList<string>

Removed

The points whose packs are deleted (restorable or not), ascending.

public IReadOnlyList<uint> Removed { get; init; }

Property Value

IReadOnlyList<uint>

Methods

Deconstruct(out IReadOnlyList<uint>, out IReadOnlyList<uint>, out IReadOnlyList<uint>, out IReadOnlyList<string>, out uint, out long, out long, out BackupRetentionBlock, out string, out string)

public void Deconstruct(out IReadOnlyList<uint> Kept, out IReadOnlyList<uint> Removed, out IReadOnlyList<uint> Compactions, out IReadOnlyList<string> PackDeletions, out uint CutoffId, out long BytesBefore, out long BytesAfterAtMost, out BackupRetentionBlock Blocked, out string BlockedReason, out string Fingerprint)

Parameters

Kept IReadOnlyList<uint>
Removed IReadOnlyList<uint>
Compactions IReadOnlyList<uint>
PackDeletions IReadOnlyList<string>
CutoffId uint
BytesBefore long
BytesAfterAtMost long
Blocked BackupRetentionBlock
BlockedReason string
Fingerprint string

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(BackupRetentionPlan?)

public bool Equals(BackupRetentionPlan? other)

Parameters

other BackupRetentionPlan

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(BackupRetentionPlan?, BackupRetentionPlan?)

public static bool operator ==(BackupRetentionPlan? left, BackupRetentionPlan? right)

Parameters

left BackupRetentionPlan
right BackupRetentionPlan

Returns

bool

operator !=(BackupRetentionPlan?, BackupRetentionPlan?)

public static bool operator !=(BackupRetentionPlan? left, BackupRetentionPlan? right)

Parameters

left BackupRetentionPlan
right BackupRetentionPlan

Returns

bool