NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
NES::Runtime::BufferStorage Class Reference

The Buffer Storage class stores tuples inside a queue and trims it when the right acknowledgement is received. More...

#include <BufferStorage.hpp>

Collaboration diagram for NES::Runtime::BufferStorage:
[legend]

Public Member Functions

 BufferStorage ()=default
 Constructor, which creates a buffer storage. More...
 
void insertBuffer (NES::Runtime::TupleBuffer bufferPtr) override
 Inserts a tuple buffer for a given nes partition. More...
 
void trimBuffer (uint64_t timestamp) override
 Deletes all tuple buffers which watermark timestamp is smaller than the given timestamp. More...
 
size_t getStorageSize () const override
 Returns current storage size. More...
 
std::optional< NES::Runtime::TupleBuffergetTopElementFromQueue () const
 Returns top element of the queue. More...
 
void removeTopElementFromQueue ()
 Removes the top element from the queue. More...
 
- Public Member Functions inherited from NES::Runtime::AbstractBufferStorage
virtual ~AbstractBufferStorage () noexcept=default
 

Detailed Description

The Buffer Storage class stores tuples inside a queue and trims it when the right acknowledgement is received.

Constructor & Destructor Documentation

◆ BufferStorage()

NES::Runtime::BufferStorage::BufferStorage ( )
default

Constructor, which creates a buffer storage.

Member Function Documentation

◆ getStorageSize()

size_t NES::Runtime::BufferStorage::getStorageSize ( ) const
overridevirtual

Returns current storage size.

Returns
Current storage size

Implements NES::Runtime::AbstractBufferStorage.

◆ getTopElementFromQueue()

std::optional< TupleBuffer > NES::Runtime::BufferStorage::getTopElementFromQueue ( ) const

Returns top element of the queue.

Returns
buffer storage unit

◆ insertBuffer()

void NES::Runtime::BufferStorage::insertBuffer ( NES::Runtime::TupleBuffer  bufferPtr)
overridevirtual

Inserts a tuple buffer for a given nes partition.

Parameters
nesPartitiondestination
bufferPtrpointer to the buffer that will be stored

Implements NES::Runtime::AbstractBufferStorage.

◆ removeTopElementFromQueue()

void NES::Runtime::BufferStorage::removeTopElementFromQueue ( )

Removes the top element from the queue.

◆ trimBuffer()

void NES::Runtime::BufferStorage::trimBuffer ( uint64_t  timestamp)
overridevirtual

Deletes all tuple buffers which watermark timestamp is smaller than the given timestamp.

Parameters
NesPartitiondestination
timestampmax timestamp of current epoch

Implements NES::Runtime::AbstractBufferStorage.

References NES_TRACE, and timestamp.


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