Class ExportImportFilesMetadata
- Namespace
- RocksDbNet
- Assembly
- RocksDb.Net.dll
Describes an exported column family: the comparator it was written with and
the files that make it up. Maps to
rocksdb_export_import_files_metadata_t.
public sealed class ExportImportFilesMetadata : RocksDbHandle, IDisposable
- Inheritance
-
ExportImportFilesMetadata
- Implements
- Inherited Members
Remarks
Produced by ExportColumnFamily(ColumnFamilyHandle, string) and consumed by CreateColumnFamilyWithImport(string, DbOptions, ExportImportFilesMetadata, ImportColumnFamilyOptions?).
It is independent of the database that produced it, so it may outlive the export, but the files it names must still be where it says they are.
Read-only, and produced only by an export. Assembling metadata by hand, which is how an export and an import in separate processes would be joined, needs RocksDb's file-list builder functions; those are not wrapped, so the export and the import have to happen in the same process.
Properties
DbComparatorName
Name of the comparator the column family was written with.
public string DbComparatorName { get; }
Property Value
Remarks
An import fails unless the receiving column family uses the same comparator, because the files are ordered by it.
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().
GetFiles()
Returns the file list.
public IReadOnlyList<LiveFileMetadata> GetFiles()
Returns
Remarks
Read in full, so the result needs no disposal and does not depend on this metadata staying alive. Changing it does not change this metadata, which is read-only.