Yarilo v0.9.9
WPA2 Decrypter & Packet Analyzer
Loading...
Searching...
No Matches
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. If the queue is full, it replaces the last item in the queue. This method does not wait and handles the insertion or replacement immediately.
 
bool fetch_all (std::vector< proto::LogEntry * > &refFetchedItems)
 Fetches all log entries from the queue.
 
void stop ()
 Stops the queue. This will unblock all waiting threads and prevent further operations.
 
bool is_stopped ()
 Checks if the queue has been stopped.
 

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.

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

◆ insert()

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

Inserts a log entry into the queue. If the queue is full, it replaces the last item in the queue. This method does not wait and handles the insertion or replacement immediately.

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

◆ is_stopped()

bool yarilo::LogQueue::is_stopped ( )
inline

Checks if the queue has been stopped.

Returns
True if the queue is stopped, otherwise false.

◆ stop()

void yarilo::LogQueue::stop ( )
inline

Stops the queue. This will unblock all waiting threads and prevent further operations.


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