namespace ZB.MOM.WW.CBDD.Core.Storage;
///
/// Narrow storage port for index structures (page operations + allocation only).
///
internal interface IIndexStorage
{
///
/// Gets or sets the PageSize.
///
int PageSize { get; }
///
/// Executes AllocatePage.
///
uint AllocatePage();
///
/// Executes FreePage.
///
/// The page identifier.
void FreePage(uint pageId);
///
/// Executes ReadPage.
///
/// The page identifier.
/// The optional transaction identifier.
/// The destination buffer.
void ReadPage(uint pageId, ulong? transactionId, Span destination);
///
/// Executes WritePage.
///
/// The page identifier.
/// The transaction identifier.
/// The source page data.
void WritePage(uint pageId, ulong transactionId, ReadOnlySpan data);
///
/// Executes WritePageImmediate.
///
/// The page identifier.
/// The source page data.
void WritePageImmediate(uint pageId, ReadOnlySpan data);
}