SimplifiedArchiveInitializerTKey, TValueCreateArchiveFile Method
Creates an archive file with specified keys, estimated size, and data.
Namespace: SnapDB.Snap.Services.WriterAssembly: SnapDB (in SnapDB.dll) Version: 1.0.102.0 -- Release Build+29075351d0e5aa4dea46a5c520805222f672dc2e
public SortedTreeTable<TKey, TValue> CreateArchiveFile(
TKey startKey,
TKey endKey,
long estimatedSize,
TreeStream<TKey, TValue> data,
Action<Guid>? archiveIdCallback
)
Public Function CreateArchiveFile (
startKey As TKey,
endKey As TKey,
estimatedSize As Long,
data As TreeStream(Of TKey, TValue),
archiveIdCallback As Action(Of Guid)
) As SortedTreeTable(Of TKey, TValue)
public:
SortedTreeTable<TKey, TValue>^ CreateArchiveFile(
TKey startKey,
TKey endKey,
long long estimatedSize,
TreeStream<TKey, TValue>^ data,
Action<Guid>^ archiveIdCallback
)
function CreateArchiveFile(startKey, endKey, estimatedSize, data, archiveIdCallback);
- startKey TKey
- The first key of the archive file.
- endKey TKey
- The last key of the archive file.
- estimatedSize Int64
- The estimated size of the archive file.
- data TreeStreamTKey, TValue
- The data to be written to the archive file.
- archiveIdCallback ActionGuid
- A callback function to handle the archive file's unique identifier.
SortedTreeTableTKey,
TValueA sorted tree table representing the created archive file.
The CreateArchiveFile(TKey, TKey, Int64, TreeStreamTKey, TValue, ActionGuid) method creates an archive file with the specified start and end keys, estimated size,
and data. It uses a pending file to write the data and then renames it to the final file. The archive file is opened and
returned as a sorted tree table.