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

#include <AbstractBufferProvider.hpp>

Public Member Functions

virtual ~AbstractBufferProvider ()
 
virtual void destroy ()=0
 
virtual size_t getAvailableBuffers () const =0
 
virtual BufferManagerType getBufferManagerType () const =0
 
virtual size_t getBufferSize () const =0
 
virtual size_t getNumOfPooledBuffers () const =0
 
virtual size_t getNumOfUnpooledBuffers () const =0
 
virtual TupleBuffer getBufferBlocking ()=0
 Provides a new TupleBuffer. This blocks until a buffer is available. More...
 
virtual std::optional< TupleBuffergetBufferNoBlocking ()=0
 Returns a new TupleBuffer wrapped in an optional or an invalid option if there is no buffer. More...
 
virtual std::optional< TupleBuffergetBufferTimeout (std::chrono::milliseconds timeout_ms)=0
 Returns a new Buffer wrapped in an optional or an invalid option if there is no buffer available within timeout_ms. More...
 
virtual std::optional< TupleBuffergetUnpooledBuffer (size_t bufferSize)=0
 Returns an unpooled buffer of size bufferSize wrapped in an optional or an invalid option if an error occurs. More...
 

Constructor & Destructor Documentation

◆ ~AbstractBufferProvider()

virtual NES::Runtime::AbstractBufferProvider::~AbstractBufferProvider ( )
inlinevirtual

Member Function Documentation

◆ destroy()

virtual void NES::Runtime::AbstractBufferProvider::destroy ( )
pure virtual

◆ getAvailableBuffers()

virtual size_t NES::Runtime::AbstractBufferProvider::getAvailableBuffers ( ) const
pure virtual

◆ getBufferBlocking()

virtual TupleBuffer NES::Runtime::AbstractBufferProvider::getBufferBlocking ( )
pure virtual

Provides a new TupleBuffer. This blocks until a buffer is available.

Returns
a new buffer

Implemented in NES::Runtime::LocalBufferPool, NES::Runtime::FixedSizeBufferPool, and NES::Runtime::BufferManager.

◆ getBufferManagerType()

virtual BufferManagerType NES::Runtime::AbstractBufferProvider::getBufferManagerType ( ) const
pure virtual

◆ getBufferNoBlocking()

virtual std::optional<TupleBuffer> NES::Runtime::AbstractBufferProvider::getBufferNoBlocking ( )
pure virtual

Returns a new TupleBuffer wrapped in an optional or an invalid option if there is no buffer.

Returns
a new buffer

Implemented in NES::Runtime::LocalBufferPool, NES::Runtime::FixedSizeBufferPool, and NES::Runtime::BufferManager.

◆ getBufferSize()

virtual size_t NES::Runtime::AbstractBufferProvider::getBufferSize ( ) const
pure virtual
Returns
Configured size of the buffers

Implemented in NES::Runtime::LocalBufferPool, NES::Runtime::FixedSizeBufferPool, and NES::Runtime::BufferManager.

◆ getBufferTimeout()

virtual std::optional<TupleBuffer> NES::Runtime::AbstractBufferProvider::getBufferTimeout ( std::chrono::milliseconds  timeout_ms)
pure virtual

Returns a new Buffer wrapped in an optional or an invalid option if there is no buffer available within timeout_ms.

Parameters
timeout_msthe amount of time to wait for a new buffer to be retuned
Returns
a new buffer

Implemented in NES::Runtime::LocalBufferPool, NES::Runtime::BufferManager, and NES::Runtime::FixedSizeBufferPool.

◆ getNumOfPooledBuffers()

virtual size_t NES::Runtime::AbstractBufferProvider::getNumOfPooledBuffers ( ) const
pure virtual
Returns
Number of total buffers in the pool

Implemented in NES::Runtime::LocalBufferPool, NES::Runtime::FixedSizeBufferPool, and NES::Runtime::BufferManager.

◆ getNumOfUnpooledBuffers()

virtual size_t NES::Runtime::AbstractBufferProvider::getNumOfUnpooledBuffers ( ) const
pure virtual
Returns
number of unpooled buffers

Implemented in NES::Runtime::LocalBufferPool, NES::Runtime::FixedSizeBufferPool, and NES::Runtime::BufferManager.

◆ getUnpooledBuffer()

virtual std::optional<TupleBuffer> NES::Runtime::AbstractBufferProvider::getUnpooledBuffer ( size_t  bufferSize)
pure virtual

Returns an unpooled buffer of size bufferSize wrapped in an optional or an invalid option if an error occurs.

Parameters
bufferSize
Returns
a new buffer

Implemented in NES::Runtime::LocalBufferPool, NES::Runtime::FixedSizeBufferPool, and NES::Runtime::BufferManager.


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