Template Class ChunkQueuePusher

Class Documentation

template<typename ChunkQueueDataType>
class ChunkQueuePusher

The ChunkQueuePusher is the low layer building block to push SharedChunks in a chunk queue. Together with the ChunkDistributor and ChunkQueuePopper the ChunkQueuePusher builds the infrastructure to exchange memory chunks between different data producers and consumers that could be located in different processes. A ChunkQueuePusher is the part of the chunk queue that is knwon by the ChunkDistributor.

Public Types

using MemberType_t = ChunkQueueDataType

Public Functions

explicit ChunkQueuePusher(cxx::not_null<MemberType_t*const> chunkQueueDataPtr) noexcept
ChunkQueuePusher(const ChunkQueuePusher &other) = delete
ChunkQueuePusher &operator=(const ChunkQueuePusher&) = delete
ChunkQueuePusher(ChunkQueuePusher &&rhs) noexcept = default
ChunkQueuePusher &operator=(ChunkQueuePusher &&rhs) noexcept = default
~ChunkQueuePusher() noexcept = default
bool push(mepoo::SharedChunk chunk) noexcept

push a new chunk to the chunk queue

Parameters:

shared[in] chunk object

Returns:

false if a queue overflow occurred, otherwise true

void lostAChunk() noexcept

tell the queue that it lost a chunk (e.g. because push failed and there will be no retry)

Protected Functions

const MemberType_t *getMembers() const noexcept
MemberType_t *getMembers() noexcept