This class represent the network channel for data transfer that NES uses to send data among nodes. This class can send data and event packets. This class is not thread-safe.
More...
#include <NetworkChannel.hpp>
|
| NetworkChannel (zmq::socket_t &&zmqSocket, ChannelId channelId, std::string &&address, Runtime::BufferManagerPtr bufferManager) |
| Creates a network channel instance with the given parameters. More...
|
|
| ~NetworkChannel () |
| close the output channel and release resources More...
|
|
| NetworkChannel (const NetworkChannel &)=delete |
|
NetworkChannel & | operator= (const NetworkChannel &)=delete |
|
void | close (Runtime::QueryTerminationType, uint16_t numSendingThreads=0, uint64_t currentMessageSequenceNumber=0, bool shouldPropagateMarker=false, const std::optional< ReconfigurationMarkerPtr > &=std::nullopt) |
| Closes the underlying network connection with a termination type. More...
|
|
| NetworkEventSender (Args &&... args) |
| Forwarding ctor: it forwards the args to the base class. More...
|
|
bool | sendEvent (Arguments &&... args) |
|
bool | sendEvent (Runtime::TupleBuffer &&inputBuffer, Runtime::EventType eventType) |
|
template<typename... Args> |
| NetworkDataSender (Args &&... args) |
| Forwarding ctor: it forwards the args to the base class. More...
|
|
bool | sendBuffer (Runtime::TupleBuffer &buffer, uint64_t tupleSize, uint64_t messageSequenceNumber) |
| Send buffer to the destination defined in the constructor. Note that this method will internally compute the payloadSize as tupleSizeInBytes*buffer.getNumberOfTuples() More...
|
|
|
static NetworkChannelPtr | create (const std::shared_ptr< zmq::context_t > &zmqContext, std::string &&socketAddr, NesPartition nesPartition, ExchangeProtocol &protocol, Runtime::BufferManagerPtr bufferManager, int highWaterMark, std::chrono::milliseconds waitTime, uint8_t retryTimes, DecomposedQueryPlanVersion version, std::optional< std::future< bool >> abortConnection=std::nullopt) |
| Creates a network channel instance with the given parameters. More...
|
|
This class represent the network channel for data transfer that NES uses to send data among nodes. This class can send data and event packets. This class is not thread-safe.
◆ NetworkChannel() [1/2]
Creates a network channel instance with the given parameters.
- Parameters
-
zmqContext | the local zmq server context |
channelId | the remote nes channel id to connect to |
address | the socket address of the remote server |
bufferManager | the buffer manager |
◆ ~NetworkChannel()
NES::Network::NetworkChannel::~NetworkChannel |
( |
| ) |
|
◆ NetworkChannel() [2/2]
NES::Network::NetworkChannel::NetworkChannel |
( |
const NetworkChannel & |
| ) |
|
|
delete |
◆ close()
void NES::Network::NetworkChannel::close |
( |
Runtime::QueryTerminationType |
terminationType, |
|
|
uint16_t |
numSendingThreads = 0 , |
|
|
uint64_t |
currentMessageSequenceNumber = 0 , |
|
|
bool |
shouldPropagateMarker = false , |
|
|
const std::optional< ReconfigurationMarkerPtr > & |
reconfigurationMarker = std::nullopt |
|
) |
| |
◆ create()
NetworkChannelPtr NES::Network::NetworkChannel::create |
( |
const std::shared_ptr< zmq::context_t > & |
zmqContext, |
|
|
std::string && |
socketAddr, |
|
|
NesPartition |
nesPartition, |
|
|
ExchangeProtocol & |
protocol, |
|
|
Runtime::BufferManagerPtr |
bufferManager, |
|
|
int |
highWaterMark, |
|
|
std::chrono::milliseconds |
waitTime, |
|
|
uint8_t |
retryTimes, |
|
|
DecomposedQueryPlanVersion |
version, |
|
|
std::optional< std::future< bool >> |
abortConnection = std::nullopt |
|
) |
| |
|
static |
Creates a network channel instance with the given parameters.
- Parameters
-
zmqContext | the local zmq server context |
address | the ip address of the remote server |
nesPartition | the remote nes partition to connect to |
protocol | the protocol implementation |
bufferManager | the buffer manager |
highWaterMark | the max number of buffers the channel takes before blocking |
waitTime | the backoff time in case of failure when connecting |
retryTimes | the number of retries before the methods will raise error. Set this to zero to retry indefinitely |
version | the version number that will be used by the receiver to determine if it can already accept messages from this client |
abortConnection | a future which which will be checked on every connection retry. By setting a value in the corresponding promise, the calling thread can abort the connection process if the connection is performed asynchronously. |
- Returns
- the network channel or nullptr on error
References backward::details::move(), and protocol.
Referenced by NES::Network::NetworkManager::registerSubpartitionProducer().
◆ operator=()
◆ canSendData
constexpr bool NES::Network::NetworkChannel::canSendData = inherited::canSendData |
|
staticconstexpr |
◆ canSendEvent
constexpr bool NES::Network::NetworkChannel::canSendEvent = inherited::canSendEvent |
|
staticconstexpr |
The documentation for this class was generated from the following files: