Skip to main content

chronon::sender::IMessageQueue

More...

#include <MessageQueue.hpp>

Inherited by chronon::sender::LockFreeQueueAdapter< T >, chronon::sender::MessageQueueAdapter< T >, chronon::sender::MultiProducerQueueAdapter< T >, chronon::sender::SingleThreadQueueAdapter< T >

Public Functions

Name
virtual~IMessageQueue() =default
virtual std::optional< T >tryPop(uint64_t current_cycle) =0
virtual size_tsize() const =0
virtual voidsetCapacity(size_t capacity) =0
virtual boolpush(T data, uint64_t arrive_cycle) =0
virtual std::vector< T >popAll(uint64_t current_cycle) =0
virtual std::optional< uint64_t >minArrivalCycle() const =0
virtual boolhasReady(uint64_t current_cycle) const =0
virtual boolfull() const =0
virtual boolempty() const =0
virtual voidclear() =0
virtual size_tcapacity() const =0
virtual size_tavailable() const =0

Detailed Description

template <typename T >
class chronon::sender::IMessageQueue;

IMessageQueue - Type-erased interface for message queues.

Allows switching between MessageQueue and SingleThreadMessageQueue at runtime.

Public Functions Documentation

function ~IMessageQueue

virtual ~IMessageQueue() =default

function tryPop

virtual std::optional< T > tryPop(
uint64_t current_cycle
) =0

Reimplemented by: chronon::sender::LockFreeQueueAdapter::tryPop, chronon::sender::MessageQueueAdapter::tryPop, chronon::sender::MultiProducerQueueAdapter::tryPop, chronon::sender::MultiProducerQueueAdapter::tryPop, chronon::sender::SingleThreadQueueAdapter::tryPop

function size

virtual size_t size() const =0

Reimplemented by: chronon::sender::LockFreeQueueAdapter::size, chronon::sender::MessageQueueAdapter::size, chronon::sender::MultiProducerQueueAdapter::size, chronon::sender::MultiProducerQueueAdapter::size, chronon::sender::SingleThreadQueueAdapter::size

function setCapacity

virtual void setCapacity(
size_t capacity
) =0

Reimplemented by: chronon::sender::LockFreeQueueAdapter::setCapacity, chronon::sender::MessageQueueAdapter::setCapacity, chronon::sender::MultiProducerQueueAdapter::setCapacity, chronon::sender::MultiProducerQueueAdapter::setCapacity, chronon::sender::SingleThreadQueueAdapter::setCapacity

function push

virtual bool push(
T data,
uint64_t arrive_cycle
) =0

Reimplemented by: chronon::sender::LockFreeQueueAdapter::push, chronon::sender::MessageQueueAdapter::push, chronon::sender::MultiProducerQueueAdapter::push, chronon::sender::MultiProducerQueueAdapter::push, chronon::sender::SingleThreadQueueAdapter::push

function popAll

virtual std::vector< T > popAll(
uint64_t current_cycle
) =0

Reimplemented by: chronon::sender::LockFreeQueueAdapter::popAll, chronon::sender::MessageQueueAdapter::popAll, chronon::sender::MultiProducerQueueAdapter::popAll, chronon::sender::MultiProducerQueueAdapter::popAll, chronon::sender::SingleThreadQueueAdapter::popAll

function minArrivalCycle

virtual std::optional< uint64_t > minArrivalCycle() const =0

Reimplemented by: chronon::sender::LockFreeQueueAdapter::minArrivalCycle, chronon::sender::MessageQueueAdapter::minArrivalCycle, chronon::sender::MultiProducerQueueAdapter::minArrivalCycle, chronon::sender::MultiProducerQueueAdapter::minArrivalCycle, chronon::sender::SingleThreadQueueAdapter::minArrivalCycle

function hasReady

virtual bool hasReady(
uint64_t current_cycle
) const =0

Reimplemented by: chronon::sender::LockFreeQueueAdapter::hasReady, chronon::sender::MessageQueueAdapter::hasReady, chronon::sender::MultiProducerQueueAdapter::hasReady, chronon::sender::MultiProducerQueueAdapter::hasReady, chronon::sender::SingleThreadQueueAdapter::hasReady

function full

virtual bool full() const =0

Reimplemented by: chronon::sender::LockFreeQueueAdapter::full, chronon::sender::MessageQueueAdapter::full, chronon::sender::MultiProducerQueueAdapter::full, chronon::sender::MultiProducerQueueAdapter::full, chronon::sender::SingleThreadQueueAdapter::full

function empty

virtual bool empty() const =0

Reimplemented by: chronon::sender::LockFreeQueueAdapter::empty, chronon::sender::MessageQueueAdapter::empty, chronon::sender::MultiProducerQueueAdapter::empty, chronon::sender::MultiProducerQueueAdapter::empty, chronon::sender::SingleThreadQueueAdapter::empty

function clear

virtual void clear() =0

Reimplemented by: chronon::sender::LockFreeQueueAdapter::clear, chronon::sender::MessageQueueAdapter::clear, chronon::sender::MultiProducerQueueAdapter::clear, chronon::sender::MultiProducerQueueAdapter::clear, chronon::sender::SingleThreadQueueAdapter::clear

function capacity

virtual size_t capacity() const =0

Reimplemented by: chronon::sender::LockFreeQueueAdapter::capacity, chronon::sender::MessageQueueAdapter::capacity, chronon::sender::MultiProducerQueueAdapter::capacity, chronon::sender::MultiProducerQueueAdapter::capacity, chronon::sender::SingleThreadQueueAdapter::capacity

function available

virtual size_t available() const =0

Reimplemented by: chronon::sender::LockFreeQueueAdapter::available, chronon::sender::MessageQueueAdapter::available, chronon::sender::MultiProducerQueueAdapter::available, chronon::sender::MultiProducerQueueAdapter::available, chronon::sender::SingleThreadQueueAdapter::available


Updated on 2026-05-26 at 05:42:32 +0000