Yarilo  v0.9
WPA2 Decrypter & Packet Analyzer
yarilo::LogQueue Class Reference

A queue for storing log entries with thread-safe operations. More...

#include <log_queue.h>

Public Member Functions

 LogQueue (uint64_t queueMaxSize)
 
bool insert (proto::LogEntry *item)
 Inserts a log entry into the queue. This method blocks until space is available in the queue. More...
 
bool fetch_all (std::vector< proto::LogEntry * > &refFetchedItems)
 Fetches all log entries from the queue. This method blocks until there are items available to fetch. More...
 

Detailed Description

A queue for storing log entries with thread-safe operations.

This class implements a bounded queue that supports thread-safe insertion and fetching of log entries.

Constructor & Destructor Documentation

◆ LogQueue()

yarilo::LogQueue::LogQueue ( uint64_t  queueMaxSize)
inline

Constructs a LogQueue with a specified maximum size.

Parameters
[in]queueMaxSizeMaximum size of the log queue.

Member Function Documentation

◆ fetch_all()

bool yarilo::LogQueue::fetch_all ( std::vector< proto::LogEntry * > &  refFetchedItems)
inline

Fetches all log entries from the queue. This method blocks until there are items available to fetch.

Parameters
[out]refFetchedItemsReference to a vector that will store fetched entries.
Returns
True if fetching was successful, false if timed out.

◆ insert()

bool yarilo::LogQueue::insert ( proto::LogEntry *  item)
inline

Inserts a log entry into the queue. This method blocks until space is available in the queue.

Parameters
[in]itemPointer to the log entry to be inserted.
Returns
True if the insertion was successful, false if timed out.

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