Zero  0.1.0
Static Public Member Functions | Static Public Attributes | Static Private Member Functions | Friends | List of all members
zero::buffer_pool::NoSwizzling Class Reference

TODO. More...

#include <buffer_pool_pointer_swizzling.hpp>

Static Public Member Functions

static bool isSwizzledPointer (const PageID pid) noexcept
 Checks whether a page ID is a swizzled buffer index. More...
 
static PageID makeSwizzledPointer (const bf_idx index) noexcept
 Transforms a buffer pool index into a swizzled page ID. More...
 
static bf_idx makeBufferIndex (const PageID pid) noexcept
 Transforms a swizzled page ID to a buffer pool index. More...
 
static void debugDumpPointer (std::ostream &o, PageID pid)
 Dumps the given page ID to an output stream. More...
 

Static Public Attributes

static constexpr bool usesPointerSwizzling = false
 TODO. More...
 

Static Private Member Functions

static bf_idx makeBufferIndexForFix (generic_page *parentPage, generic_page *&targetPage, PageID pid)
 

Friends

class BufferPool
 

Detailed Description

TODO.

TODO

Member Function Documentation

§ debugDumpPointer()

zero::buffer_pool::NoSwizzling::debugDumpPointer ( std::ostream &  o,
PageID  pid 
)
static

Dumps the given page ID to an output stream.

Dumps the given page ID with additional information about swizzling etc. to an output stream.

Precondition
The stream manipulators of o are set as expected.
Parameters
oThe output stream to which the pointer is printed.
pidThe pointer (page ID) to print.

§ isSwizzledPointer()

zero::buffer_pool::NoSwizzling::isSwizzledPointer ( const PageID  pid)
inlinestaticnoexcept

Checks whether a page ID is a swizzled buffer index.

Because this does not use pointer swizzling, there will be no swizzled pointers.

Parameters
pidA page ID that is not swizzled.
Returns
Whether pid is a swizzled pointer, which is always false .

§ makeBufferIndex()

zero::buffer_pool::NoSwizzling::makeBufferIndex ( const PageID  pid)
inlinestaticnoexcept

Transforms a swizzled page ID to a buffer pool index.

Because this does not use pointer swizzling, this cannot make buffer indexes from swizzled pointers.

Postcondition
The program exits with a failed assertion.
Parameters
pidA page ID that is not swizzled.
Returns
Nothing because the program crashes

§ makeBufferIndexForFix()

static bf_idx zero::buffer_pool::NoSwizzling::makeBufferIndexForFix ( generic_page parentPage,
generic_page *&  targetPage,
PageID  pid 
)
inlinestaticprivate

§ makeSwizzledPointer()

zero::buffer_pool::NoSwizzling::makeSwizzledPointer ( const bf_idx  index)
inlinestaticnoexcept

Transforms a buffer pool index into a swizzled page ID.

Because this does not use pointer swizzling, this cannot make swizzled pointers.

Postcondition
The program exits with a failed assertion.
Parameters
indexA buffer pool index
Returns
Nothing because the program crashes

Friends And Related Function Documentation

§ BufferPool

friend class BufferPool
friend

Member Data Documentation

§ usesPointerSwizzling

zero::buffer_pool::NoSwizzling::usesPointerSwizzling = false
static

TODO.


The documentation for this class was generated from the following files: