|
NebulaStream
0.6.213
NebulaStream is a data and application management framework for the internet of things
|
This class is used by the ZmqServer and defines the reaction for events onDataBuffer, clientAnnouncement, endOfStream and exceptionHandling between all nodes of NES. More...
#include <ExchangeProtocol.hpp>
Public Member Functions | |
| ExchangeProtocol (std::shared_ptr< PartitionManager > partitionManager, std::shared_ptr< ExchangeProtocolListener > listener) | |
| Create an exchange protocol object with a partition manager and a listener. More... | |
| ExchangeProtocol (const ExchangeProtocol &other) | |
| Copy-Constructor for ExchangeProtocol. More... | |
| std::variant< Messages::ServerReadyMessage, Messages::ErrorMessage > | onClientAnnouncement (Messages::ClientAnnounceMessage msg) |
| Reaction of the zmqServer after a ClientAnnounceMessage is received. More... | |
| void | onBuffer (NesPartition nesPartition, Runtime::TupleBuffer &buffer, SequenceData messageSequenceData) |
| Reaction of the zmqServer after a buffer is received. More... | |
| void | onServerError (Messages::ErrorMessage error) |
| Reaction of the zmqServer after an error occurs. More... | |
| void | onChannelError (Messages::ErrorMessage error) |
| Reaction of the zmqServer after an error occurs. More... | |
| void | onEndOfStream (Messages::EndOfStreamMessage endOfStreamMessage, std::optional< ReconfigurationMarkerPtr > marker=std::nullopt) |
| Reaction of the zmqServer after an EndOfStream message is received. More... | |
| void | onEvent (NesPartition nesPartition, Runtime::BaseEvent &event) |
| This method is called when the server receives an event message. More... | |
| std::shared_ptr< PartitionManager > | getPartitionManager () const |
| getter for the PartitionManager More... | |
This class is used by the ZmqServer and defines the reaction for events onDataBuffer, clientAnnouncement, endOfStream and exceptionHandling between all nodes of NES.
|
explicit |
Create an exchange protocol object with a partition manager and a listener.
| partitionManager | |
| listener |
References NES_ASSERT, and NES_DEBUG.
| NES::Network::ExchangeProtocol::ExchangeProtocol | ( | const ExchangeProtocol & | other | ) |
Copy-Constructor for ExchangeProtocol.
| other |
References magic_enum::detail::value().
| std::shared_ptr< PartitionManager > NES::Network::ExchangeProtocol::getPartitionManager | ( | ) | const |
getter for the PartitionManager
| void NES::Network::ExchangeProtocol::onBuffer | ( | NesPartition | nesPartition, |
| Runtime::TupleBuffer & | buffer, | ||
| SequenceData | messageSequenceData | ||
| ) |
Reaction of the zmqServer after a buffer is received.
| id | of the buffer |
| buffer | content |
| messageSequenceData |
References NES_ERROR, NES::Network::Registered, and NES::SequenceData::sequenceNumber.
| void NES::Network::ExchangeProtocol::onChannelError | ( | Messages::ErrorMessage | error | ) |
Reaction of the zmqServer after an error occurs.
| the | error message |
| std::variant< Messages::ServerReadyMessage, Messages::ErrorMessage > NES::Network::ExchangeProtocol::onClientAnnouncement | ( | Messages::ClientAnnounceMessage | msg | ) |
Reaction of the zmqServer after a ClientAnnounceMessage is received.
| clientAnnounceMessage |
References NES::Network::Messages::DataChannel, NES::Network::Deleted, NES::Network::Messages::ExchangeMessage::getChannelId(), NES::Network::Messages::ClientAnnounceMessage::getMode(), NES::Network::ChannelId::getNesPartition(), NES_DEBUG, NES_INFO, NES_WARNING, NES::Network::Registered, and NES::Network::ChannelId::toString().
| void NES::Network::ExchangeProtocol::onEndOfStream | ( | Messages::EndOfStreamMessage | endOfStreamMessage, |
| std::optional< ReconfigurationMarkerPtr > | marker = std::nullopt |
||
| ) |
Reaction of the zmqServer after an EndOfStream message is received.
| endOfStreamMessage | a message containing details about the type of EoS |
| marker | in case of reconfiguration: a marker containing a set of reconfiguration events |
References NES::Network::Messages::ExchangeMessage::getChannelId(), NES::Network::Messages::EndOfStreamMessage::getMaxMessageSequenceNumber(), NES::Network::ChannelId::getNesPartition(), NES::Network::Messages::EndOfStreamMessage::getNumberOfSendingThreads(), NES::Network::Messages::EndOfStreamMessage::getQueryTerminationType(), NES::Network::Messages::EndOfStreamMessage::isEventChannel(), backward::details::move(), NES_ASSERT2_FMT, NES_DEBUG, NES_ERROR, NES_WARNING, NES::Runtime::Reconfiguration, NES::Network::Registered, NES::Network::ChannelId::toString(), and NES::Network::Messages::UnknownPartitionError.
| void NES::Network::ExchangeProtocol::onEvent | ( | NesPartition | nesPartition, |
| Runtime::BaseEvent & | event | ||
| ) |
This method is called when the server receives an event message.
| nesPartition | |
| event |
References NES_ERROR, and NES::Network::Registered.
| void NES::Network::ExchangeProtocol::onServerError | ( | Messages::ErrorMessage | error | ) |
Reaction of the zmqServer after an error occurs.
| the | error message |