Struct File_Namespace::MultiPage

struct MultiPage

The MultiPage stores versions of the same logical page in a deque.

The purpose of MultiPage is to support storing multiple versions of the same page, which may be located in different locations and in different files. Associated with each version of a page is an “epoch” value, which is a temporal reference.

Public Functions

MultiPage(size_t pageSizeIn)

Constructor.

~MultiPage()

Destructor purges all pages.

EpochedPage current() const

Returns a reference to the most recent version of the page.

void push(const Page &page, const int epoch)

Pushes a new page with epoch value.

void pop()

Purges the oldest Page.

std::vector<EpochedPage> freePagesBeforeEpoch(const int32_t target_epoch, const int32_t current_epoch)

Public Members

size_t pageSize
std::deque<EpochedPage> pageVersions