NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
NES::Network::TestSink Class Reference
Collaboration diagram for NES::Network::TestSink:
[legend]

Public Member Functions

SinkMediumTypes getSinkMediumType () override
 method to return the type of medium More...
 
 TestSink (const SchemaPtr &schema, Runtime::NodeEnginePtr nodeEngine, const Runtime::BufferManagerPtr &bufferManager, uint32_t numOfProducers=1, SharedQueryId sharedQueryId=INVALID_SHARED_QUERY_ID, DecomposedQueryId decomposedQueryId=INVALID_DECOMPOSED_QUERY_PLAN_ID, DecomposedQueryPlanVersion decomposedQueryVersion=INVALID_DECOMPOSED_QUERY_PLAN_VERSION)
 
bool writeData (Runtime::TupleBuffer &input_buffer, Runtime::WorkerContextRef) override
 
std::string toString () const override
 virtual function to get a string describing the particular sink @Note this function is overwritten by the particular data sink More...
 
void setup () override
 virtual method to setup sink @Note this method will be overwritten by derived classes More...
 
void shutdown () override
 virtual method to shutdown sink @Note this method will be overwritten by derived classes More...
 
 ~TestSink () override=default
 
SinkMediumTypes getSinkMediumType () override
 method to return the type of medium More...
 
 TestSink (const SchemaPtr &schema, Runtime::NodeEnginePtr nodeEngine, const Runtime::BufferManagerPtr &bufferManager, uint32_t numOfProducers=1, SharedQueryId sharedQueryId=INVALID_SHARED_QUERY_ID, DecomposedQueryId decomposedQueryId=INVALID_DECOMPOSED_QUERY_PLAN_ID, DecomposedQueryPlanVersion decomposedQueryVersion=INVALID_DECOMPOSED_QUERY_PLAN_VERSION)
 
bool writeData (Runtime::TupleBuffer &input_buffer, Runtime::WorkerContextRef) override
 
std::string toString () const override
 virtual function to get a string describing the particular sink @Note this function is overwritten by the particular data sink More...
 
void setup () override
 virtual method to setup sink @Note this method will be overwritten by derived classes More...
 
void shutdown () override
 virtual method to shutdown sink @Note this method will be overwritten by derived classes More...
 
 ~TestSink () override=default
 
- Public Member Functions inherited from NES::SinkMedium
 SinkMedium (SinkFormatPtr sinkFormat, Runtime::NodeEnginePtr nodeEngine, uint32_t numOfProducers, SharedQueryId sharedQueryId, DecomposedQueryId decomposedQueryId, DecomposedQueryPlanVersion decomposedQueryVersion)
 public constructor for data sink More...
 
 SinkMedium (SinkFormatPtr sinkFormat, Runtime::NodeEnginePtr nodeEngine, uint32_t numOfProducers, SharedQueryId sharedQueryId, DecomposedQueryId decomposedQueryId, DecomposedQueryPlanVersion decomposedQueryVersion, uint64_t numberOfOrigins)
 public constructor for data sink More...
 
virtual bool writeData (Runtime::TupleBuffer &inputBuffer, Runtime::WorkerContext &workerContext)=0
 method to write a TupleBuffer More...
 
SharedQueryId getSharedQueryId () const
 get the id of the owning plan More...
 
DecomposedQueryId getParentPlanId () const
 get the subplan id of the owning plan More...
 
DecomposedQueryPlanVersion getParentPlanVersion () const
 get the subplan version of the owning plan More...
 
uint64_t getNumberOfWrittenOutBuffers ()
 debug function for testing to get number of written buffers More...
 
uint64_t getNumberOfWrittenOutTuples ()
 debug function for testing to get number of written tuples More...
 
SchemaPtr getSchemaPtr () const
 method to return the current schema of the sink More...
 
std::string getSinkFormat ()
 method to get the format as string More...
 
void reconfigure (Runtime::ReconfigurationMessage &message, Runtime::WorkerContext &context) override
 
void postReconfigurationCallback (Runtime::ReconfigurationMessage &message) override
 
OperatorId getOperatorId () const
 Get operator id. More...
 
void setMigrationFlag ()
 Sets that sink is used for state migration. More...
 
bool isForMigration () const
 Check whether this sink is used for state migration. More...
 
- Public Member Functions inherited from NES::Runtime::Reconfigurable
 ~Reconfigurable () NES_NOEXCEPT(false) override=default
 
- Public Member Functions inherited from NES::detail::virtual_enable_shared_from_this< Reconfigurable, false >
 ~virtual_enable_shared_from_this () NES_NOEXCEPT(isNoexceptDestructible) override=default
 
std::shared_ptr< T1 > shared_from_this ()
 
std::weak_ptr< T1 > weak_from_this ()
 
- Public Member Functions inherited from NES::detail::virtual_enable_shared_from_this_base< isNoexceptDestructible >
virtual ~virtual_enable_shared_from_this_base () NES_NOEXCEPT(isNoexceptDestructible)=default
 

Public Attributes

std::mutex m
 
std::promise< uint64_t > completed
 

Additional Inherited Members

- Protected Attributes inherited from NES::SinkMedium
SinkFormatPtr sinkFormat
 
bool schemaWritten
 
Runtime::NodeEnginePtr nodeEngine
 
std::atomic< uint32_t > activeProducers
 termination machinery More...
 
SharedQueryId sharedQueryId
 
DecomposedQueryId decomposedQueryId
 
DecomposedQueryPlanVersion decomposedQueryVersion
 
uint64_t numberOfOrigins
 
uint64_t sentBuffer {0}
 
uint64_t sentTuples {0}
 
std::recursive_mutex writeMutex
 
bool migration {false}
 

Constructor & Destructor Documentation

◆ TestSink() [1/2]

NES::Network::TestSink::TestSink ( const SchemaPtr schema,
Runtime::NodeEnginePtr  nodeEngine,
const Runtime::BufferManagerPtr bufferManager,
uint32_t  numOfProducers = 1,
SharedQueryId  sharedQueryId = INVALID_SHARED_QUERY_ID,
DecomposedQueryId  decomposedQueryId = INVALID_DECOMPOSED_QUERY_PLAN_ID,
DecomposedQueryPlanVersion  decomposedQueryVersion = INVALID_DECOMPOSED_QUERY_PLAN_VERSION 
)
inline

◆ ~TestSink() [1/2]

NES::Network::TestSink::~TestSink ( )
overridedefault

◆ TestSink() [2/2]

NES::Network::TestSink::TestSink ( const SchemaPtr schema,
Runtime::NodeEnginePtr  nodeEngine,
const Runtime::BufferManagerPtr bufferManager,
uint32_t  numOfProducers = 1,
SharedQueryId  sharedQueryId = INVALID_SHARED_QUERY_ID,
DecomposedQueryId  decomposedQueryId = INVALID_DECOMPOSED_QUERY_PLAN_ID,
DecomposedQueryPlanVersion  decomposedQueryVersion = INVALID_DECOMPOSED_QUERY_PLAN_VERSION 
)
inline

◆ ~TestSink() [2/2]

NES::Network::TestSink::~TestSink ( )
overridedefault

Member Function Documentation

◆ getSinkMediumType() [1/2]

SinkMediumTypes NES::Network::TestSink::getSinkMediumType ( )
inlineoverridevirtual

method to return the type of medium

Returns
type of medium

Implements NES::SinkMedium.

◆ getSinkMediumType() [2/2]

SinkMediumTypes NES::Network::TestSink::getSinkMediumType ( )
inlineoverridevirtual

method to return the type of medium

Returns
type of medium

Implements NES::SinkMedium.

◆ setup() [1/2]

void NES::Network::TestSink::setup ( )
inlineoverridevirtual

virtual method to setup sink @Note this method will be overwritten by derived classes

Implements NES::SinkMedium.

◆ setup() [2/2]

void NES::Network::TestSink::setup ( )
inlineoverridevirtual

virtual method to setup sink @Note this method will be overwritten by derived classes

Implements NES::SinkMedium.

◆ shutdown() [1/2]

void NES::Network::TestSink::shutdown ( )
inlineoverridevirtual

virtual method to shutdown sink @Note this method will be overwritten by derived classes

Implements NES::SinkMedium.

◆ shutdown() [2/2]

void NES::Network::TestSink::shutdown ( )
inlineoverridevirtual

virtual method to shutdown sink @Note this method will be overwritten by derived classes

Implements NES::SinkMedium.

◆ toString() [1/2]

std::string NES::Network::TestSink::toString ( ) const
inlineoverridevirtual

virtual function to get a string describing the particular sink @Note this function is overwritten by the particular data sink

Returns
string with name and additional information about the sink

Implements NES::SinkMedium.

◆ toString() [2/2]

std::string NES::Network::TestSink::toString ( ) const
inlineoverridevirtual

virtual function to get a string describing the particular sink @Note this function is overwritten by the particular data sink

Returns
string with name and additional information about the sink

Implements NES::SinkMedium.

◆ writeData() [1/2]

bool NES::Network::TestSink::writeData ( Runtime::TupleBuffer input_buffer,
Runtime::WorkerContextRef   
)
inlineoverride

References NES::Runtime::TupleBuffer::getBuffer(), NES::Runtime::TupleBuffer::getBufferSize(), NES::Runtime::TupleBuffer::getNumberOfTuples(), NES_TRACE, and magic_enum::detail::value().

Here is the call graph for this function:

◆ writeData() [2/2]

bool NES::Network::TestSink::writeData ( Runtime::TupleBuffer input_buffer,
Runtime::WorkerContextRef   
)
inlineoverride

References NES::Runtime::TupleBuffer::getBuffer(), NES::Runtime::TupleBuffer::getBufferSize(), NES::Runtime::TupleBuffer::getNumberOfTuples(), NES_DEBUG, and magic_enum::detail::value().

Here is the call graph for this function:

Member Data Documentation

◆ completed

std::promise< uint64_t > NES::Network::TestSink::completed

◆ m

std::mutex NES::Network::TestSink::m

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