MySQL 9.0.0
Source Code Documentation
Chnunk_Bitmap Class Reference

Bitmap for completed chunks in current state. More...

#include <clone0desc.h>

Classes

class  Bitmap_Operator_Impl
 Bitmap array index operator implementation. More...
 

Public Member Functions

 Chnunk_Bitmap ()
 Construct bitmap. More...
 
Bitmap_Operator_Impl operator[] (uint32_t index)
 Array index operator. More...
 
uint32_t * reset (uint32_t max_bits, mem_heap_t *heap)
 Reset bitmap with new size. More...
 
uint32_t get_min_unset_bit ()
 Get minimum BIT position that is not set. More...
 
uint32_t get_max_set_bit ()
 Get maximum BIT position that is not set. More...
 
void serialize (byte *&desc_chunk, uint &len)
 Serialize the descriptor. More...
 
void deserialize (const byte *desc_chunk, uint &len_left)
 Deserialize the descriptor. More...
 
size_t get_serialized_length ()
 Get the length of serialized data. More...
 
size_t capacity () const
 Maximum bit capacity. More...
 
size_t size () const
 Size of bitmap in bytes. More...
 
uint32_t size_bits () const
 Size of bitmap in bits. More...
 

Private Attributes

uint32_t * m_bitmap
 BITMAP buffer. More...
 
size_t m_size
 BITMAP buffer size: Number of 4 byte blocks. More...
 
uint32_t m_bits
 Total number of BITs in the MAP. More...
 

Detailed Description

Bitmap for completed chunks in current state.

Constructor & Destructor Documentation

◆ Chnunk_Bitmap()

Chnunk_Bitmap::Chnunk_Bitmap ( )
inline

Construct bitmap.

Member Function Documentation

◆ capacity()

size_t Chnunk_Bitmap::capacity ( ) const
inline

Maximum bit capacity.

Returns
maximum number of BITs it can hold

◆ deserialize()

void Chnunk_Bitmap::deserialize ( const byte desc_chunk,
uint &  len_left 
)

Deserialize the descriptor.

Parameters
[in]desc_chunkserialized chunk info
[in,out]len_leftlength left in bytes

◆ get_max_set_bit()

uint32_t Chnunk_Bitmap::get_max_set_bit ( )

Get maximum BIT position that is not set.

Returns
BIT position

◆ get_min_unset_bit()

uint32_t Chnunk_Bitmap::get_min_unset_bit ( )

Get minimum BIT position that is not set.

Returns
BIT position

◆ get_serialized_length()

size_t Chnunk_Bitmap::get_serialized_length ( )

Get the length of serialized data.

Returns
length serialized chunk info

◆ operator[]()

Bitmap_Operator_Impl Chnunk_Bitmap::operator[] ( uint32_t  index)
inline

Array index operator.

Parameters
[in]indexbitmap array index
Returns
operator implementation object

◆ reset()

uint32_t * Chnunk_Bitmap::reset ( uint32_t  max_bits,
mem_heap_t heap 
)

Reset bitmap with new size.

Parameters
[in]max_bitsnumber of BITs to hold
[in]heapheap for allocating memory
Returns
old buffer pointer

◆ serialize()

void Chnunk_Bitmap::serialize ( byte *&  desc_chunk,
uint &  len 
)

Serialize the descriptor.

Caller should pass the length if allocated.

Parameters
[out]desc_chunkserialized chunk info
[in,out]lenlength of serialized descriptor

◆ size()

size_t Chnunk_Bitmap::size ( ) const
inline

Size of bitmap in bytes.

Returns
BITMAP buffer size

◆ size_bits()

uint32_t Chnunk_Bitmap::size_bits ( ) const
inline

Size of bitmap in bits.

Returns
number of BITs stored

Member Data Documentation

◆ m_bitmap

uint32_t* Chnunk_Bitmap::m_bitmap
private

BITMAP buffer.

◆ m_bits

uint32_t Chnunk_Bitmap::m_bits
private

Total number of BITs in the MAP.

◆ m_size

size_t Chnunk_Bitmap::m_size
private

BITMAP buffer size: Number of 4 byte blocks.


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