SimplifiedArchiveInitializerTKey, TValueCreateArchiveFile Method

Creates an archive file with specified keys, estimated size, and data.

Definition

Namespace: SnapDB.Snap.Services.Writer
Assembly: 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
)

Parameters

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.

Return Value

SortedTreeTableTKey, TValue
A sorted tree table representing the created archive file.

Remarks

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.

See Also