namespace ZB.MOM.WW.CBDD.Core.Storage;

/// <summary>
/// Narrow storage port for index structures (page operations + allocation only).
/// </summary>
internal interface IIndexStorage
{
    int PageSize { get; }
    uint AllocatePage();
    void FreePage(uint pageId);
    void ReadPage(uint pageId, ulong? transactionId, Span<byte> destination);
    void WritePage(uint pageId, ulong transactionId, ReadOnlySpan<byte> data);
    void WritePageImmediate(uint pageId, ReadOnlySpan<byte> data);
}
