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::BufferEvictionNode Struct Reference
Collaboration diagram for duckdb::BufferEvictionNode:

Public Member Functions

 BufferEvictionNode (weak_ptr< BlockMemory > block_memory_p, idx_t eviction_seq_num)
bool CanUnload (BlockMemory &memory)
shared_ptr< BlockMemory > TryGetBlockMemory ()

Public Attributes

weak_ptr< BlockMemory > memory_p
idx_t handle_sequence_number

Constructor & Destructor Documentation

◆ BufferEvictionNode() [1/2]

duckdb::BufferEvictionNode::BufferEvictionNode ( )
inline
113901 {
113902 }

◆ BufferEvictionNode() [2/2]

duckdb::BufferEvictionNode::BufferEvictionNode ( weak_ptr< BlockMemory > block_memory_p,
idx_t eviction_seq_num )
387257 : memory_p(std::move(block_memory_p)), handle_sequence_number(eviction_seq_num) {
387258 D_ASSERT(!memory_p.expired());
387259}

Member Function Documentation

◆ CanUnload()

bool duckdb::BufferEvictionNode::CanUnload ( BlockMemory & memory)
387261 {
387262 if (handle_sequence_number != memory.GetEvictionSequenceNumber()) {
387263 // handle was used in between
387264 return false;
387265 }
387266 return memory.CanUnload();
387267}

◆ TryGetBlockMemory()

shared_ptr< BlockMemory > duckdb::BufferEvictionNode::TryGetBlockMemory ( )
387269 {
387270 auto shared_memory_p = memory_p.lock();
387271 if (!shared_memory_p) {
387272 // The block memory has been destroyed.
387273 return nullptr;
387274 }
387275 if (!CanUnload(*shared_memory_p)) {
387276 // The memory handle was used in between.
387277 return nullptr;
387278 }
387279 // The node is the latest node in the queue with this memory.
387280 return shared_memory_p;
387281}

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