Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::BlockHandle Class Reference
Inheritance diagram for duckdb::BlockHandle:
Collaboration diagram for duckdb::BlockHandle:

Public Member Functions

 BlockHandle (BlockManager &block_manager, block_id_t block_id, MemoryTag tag)
 
 BlockHandle (BlockManager &block_manager, block_id_t block_id, MemoryTag tag, unique_ptr< FileBuffer > buffer, DestroyBufferUpon destroy_buffer_upon, idx_t size, BufferPoolReservation &&reservation)
 
BlockManagerGetBlockManager () const
 Returns a reference to the block manager.
 
block_id_t BlockId () const
 Returns the block id.
 
idx_t GetBlockAllocSize () const
 Returns the block allocation size of this block.
 
idx_t GetBlockHeaderSize () const
 Returns the block header size including the 8-byte checksum.
 
idx_t GetBlockSize () const
 
const BlockMemoryGetMemory () const
 Returns a const reference to the memory of a block.
 
BlockMemoryGetMemory ()
 Returns a reference to the memory of a block.
 
weak_ptr< BlockMemoryGetMemoryWeak () const
 Returns a weak pointer to the memory of a block.
 
BufferHandle LoadFromBuffer (BlockLock &l, data_ptr_t data, unique_ptr< FileBuffer > reusable_buffer, BufferPoolReservation reservation)
 
BufferHandle Load (QueryContext context, unique_ptr< FileBuffer > buffer=nullptr)
 
- Public Member Functions inherited from duckdb::enable_shared_from_this< BlockHandle >
shared_ptr< BlockHandleshared_from_this ()
 
shared_ptr< BlockHandle constshared_from_this () const
 

Private Attributes

BlockManagerblock_manager
 The block manager, which loads the block.
 
idx_t block_alloc_size
 
idx_t block_header_size
 The size of the block header, including the checksum.
 
const block_id_t block_id
 The block id of the block.
 
const shared_ptr< BlockMemorymemory_p
 Pointer to the underlying memory of the block.
 
BlockMemorymemory
 Memory for fast access to the block memory.
 

Additional Inherited Members

- Protected Member Functions inherited from duckdb::enable_shared_from_this< BlockHandle >
 enable_shared_from_this (enable_shared_from_this const &) noexcept
 
enable_shared_from_thisoperator= (enable_shared_from_this const &) noexcept
 

Member Function Documentation

◆ GetBlockManager()

BlockManager & duckdb::BlockHandle::GetBlockManager ( ) const
inline

Returns a reference to the block manager.

45861 {
45862 return block_manager;
45863 }
BlockManager & block_manager
The block manager, which loads the block.
Definition duckdb.hpp:45902

◆ BlockId()

block_id_t duckdb::BlockHandle::BlockId ( ) const
inline

Returns the block id.

45865 {
45866 return block_id;
45867 }
const block_id_t block_id
The block id of the block.
Definition duckdb.hpp:45912

◆ GetBlockAllocSize()

idx_t duckdb::BlockHandle::GetBlockAllocSize ( ) const
inline

Returns the block allocation size of this block.

45869 {
45870 return block_alloc_size;
45871 }
idx_t block_alloc_size
Definition duckdb.hpp:45908

◆ GetBlockHeaderSize()

idx_t duckdb::BlockHandle::GetBlockHeaderSize ( ) const
inline

Returns the block header size including the 8-byte checksum.

45873 {
45874 return block_header_size;
45875 }
idx_t block_header_size
The size of the block header, including the checksum.
Definition duckdb.hpp:45910

◆ GetBlockSize()

idx_t duckdb::BlockHandle::GetBlockSize ( ) const
inline

Returns the size of the block that is available for usage, as determined by the block manager that created the block. The block_alloc_size can differ from the memory_usage for blocks managed by the temporary block manager, thus, this should only be called for persistent blocks.

45879 {
45881 }

◆ GetMemory() [1/2]

const BlockMemory & duckdb::BlockHandle::GetMemory ( ) const
inline

Returns a const reference to the memory of a block.

45883 {
45884 return memory;
45885 }
BlockMemory & memory
Memory for fast access to the block memory.
Definition duckdb.hpp:45917

◆ GetMemory() [2/2]

BlockMemory & duckdb::BlockHandle::GetMemory ( )
inline

Returns a reference to the memory of a block.

45887 {
45888 return memory;
45889 }

◆ GetMemoryWeak()

weak_ptr< BlockMemory > duckdb::BlockHandle::GetMemoryWeak ( ) const
inline

Returns a weak pointer to the memory of a block.

45891 {
45892 return weak_ptr<BlockMemory>(memory_p);
45893 }
const shared_ptr< BlockMemory > memory_p
Pointer to the underlying memory of the block.
Definition duckdb.hpp:45915

Member Data Documentation

◆ block_alloc_size

idx_t duckdb::BlockHandle::block_alloc_size
private

The block allocation size, which is determined by the block manager creating the block. For non-temporary block managers the block_alloc_size corresponds to the memory_usage. If we are pinning/loading an unloaded block, then we know how much memory to reserve. This is NOT the actual memory available on a block.


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