Class CompactFilesOptions
- Namespace
- RocksDbNet
- Assembly
- RocksDb.Net.dll
Options for CompactFiles(CompactFilesOptions?, IReadOnlyList<string>, int, int),
which compacts an explicit list of files.
Maps to rocksdb_compaction_options_t.
public sealed class CompactFilesOptions : RocksDbHandle, IDisposable
- Inheritance
-
CompactFilesOptions
- Implements
- Inherited Members
Remarks
Not to be confused with CompactRangeOptions, which configures
CompactRange(ReadOnlySpan<byte>, ReadOnlySpan<byte>)
and maps to the separate rocksdb_compactoptions_t.
Constructors
CompactFilesOptions()
public CompactFilesOptions()
Properties
AllowTrivialMove
If true, a file may be moved to the output level untouched when nothing there overlaps it, instead of being rewritten.
public bool AllowTrivialMove { get; set; }
Property Value
CancellationFlag
A flag the compaction polls so it can be cancelled from another thread,
or null for no cancellation.
public CompactionCancellationFlag? CancellationFlag { get; set; }
Property Value
Remarks
RocksDb stores only the raw pointer, so the flag must stay alive for as
long as these options are used. Assigning null clears it, which is
what to do before disposing a flag while the options live on.
Compression
Compression to apply to the files this compaction writes.
public Compression Compression { get; set; }
Property Value
MaxSubcompactions
Number of threads the compaction may split itself across.
public uint MaxSubcompactions { get; set; }
Property Value
OutputFileSizeLimit
Maximum size in bytes of each output file. 0 lets RocksDb decide.
public ulong OutputFileSizeLimit { get; set; }
Property Value
OutputTemperatureOverride
Storage temperature for the output files, overriding whatever the column family would otherwise choose.
public Temperature OutputTemperatureOverride { get; set; }
Property Value
Methods
DisposeHandle()
Releases the native handle. Called during disposal.
protected override void DisposeHandle()
Remarks
Protected rather than public: it destroys the native object without marking this instance disposed or clearing the handle, so calling it from outside and then disposing normally would free the same pointer twice. It was the most Dispose-looking member on the type. Callers want Dispose().
DisposeUnmanagedResources()
Releases unmanaged resources used by the current instance.
protected override void DisposeUnmanagedResources()
Remarks
Protected for the same reason as DisposeHandle().