Class NcLuggageArchiveOptions
- Namespace
- Hi.SqliteUtils
- Assembly
- HiNc.dll
Internal Use Only. The knobs of Archive(string, string, int, int, DateTime, IProgress<IMessage>, NcLuggageArchiveOptions) (the NC play result recording's P6): how the free space of the result folder's drive is read (FreeSpaceOf, replaced by the tests), how many steps one copy statement takes (ChunkSteps), how many touched rows the page size is sampled from (SampleRows), how often the copy says its progress (ProgressEverySteps), the headroom the cold scan's estimate is multiplied by (Headroom) and the bytes the gate keeps free beyond the archive (ReserveBytes). Default is what the recorder starts from, its reserve set to the result file's WAL.
public sealed record NcLuggageArchiveOptions : IEquatable<NcLuggageArchiveOptions>
- Inheritance
-
NcLuggageArchiveOptions
- Implements
- Inherited Members
- Extension Methods
Fields
Default
The recorder's options: the drive's free space, the storage's default chunk, sample, progress stride and headroom.
public static readonly NcLuggageArchiveOptions Default
Field Value
Properties
ChunkSteps
The steps one INSERT INTO … SELECT copies; DefaultChunkSteps unless set.
public int ChunkSteps { get; init; }
Property Value
FreeSpaceOf
Answers the free bytes of the drive a directory lies on, or null when it cannot be told (the gate then lets the copy go and leaves a full disk to the copy's own failure). DriveFreeSpace(string) unless replaced.
public Func<string, long?> FreeSpaceOf { get; init; }
Property Value
Headroom
What the cold scan's byte total is multiplied by for the space the file will take (the file's pages over the columns' bytes); 1.25 unless set.
public double Headroom { get; init; }
Property Value
ProgressEverySteps
The steps between two progress messages of the copy; DefaultProgressEverySteps unless set.
public long ProgressEverySteps { get; init; }
Property Value
ReserveBytes
The bytes the gate keeps free beyond the archive, for what follows the copy – the recorder passes the result file's WAL, folded into the file at the completion that follows; 0 unless set.
public long ReserveBytes { get; init; }
Property Value
SampleRows
The touched rows the page size is sampled from; DefaultSampleRows unless set.
public int SampleRows { get; init; }
Property Value
Methods
DriveFreeSpace(string)
The free bytes of the file system directory lies on (AvailableFreeSpace of the directory itself: its drive on Windows, its mount on other systems), null when it cannot be told or asked (a UNC path on Windows among others).
public static long? DriveFreeSpace(string directory)
Parameters
directorystringA directory; one that exists, on systems that resolve the mount from the path.
Returns
- long?
The free bytes, or null.