3#ifndef DATASTORM_NODE_H
4#define DATASTORM_NODE_H
13 template<
typename,
typename,
typename>
class Topic;
22 [[nodiscard]]
const char*
what() const noexcept final;
71 template<
typename ArgvT>
Node(
int& argc, ArgvT argv) :
Node{createNodeOptions(argc, argv)} {}
108 template<typename ArgvT>
NodeOptions createNodeOptions(
int& argc, ArgvT argv)
116 std::shared_ptr<DataStormI::Instance> _instance;
117 std::shared_ptr<DataStormI::TopicFactory> _factory;
118 bool _ownsCommunicator{
false};
120 template<
typename,
typename,
typename>
friend class Topic;
const char * what() const noexcept final
Gets the error message of this exception.
The exception that is thrown when a blocking operation is interrupted by the shutdown of the node.
Node(Ice::CommunicatorPtr communicator)
Constructs a DataStorm node with the specified communicator.
Ice::CommunicatorPtr getCommunicator() const noexcept
Returns the Ice communicator associated with the node.
void shutdown() noexcept
Shuts down the node. The shutdown interrupts calls which are waiting for events, writers or readers.
Node(Node &&node) noexcept
Move constructor.
Ice::ConnectionPtr getSessionConnection(std::string_view ident) const noexcept
Returns the Ice connection associated with a session given a session identifier.
bool isShutdown() const noexcept
Returns whether or not the node shutdown has been initiated.
Node(NodeOptions options={})
Constructs a DataStorm node.
Node(int &argc, ArgvT argv)
Constructs a DataStorm node with an Ice communicator initialized from command-line arguments.
void waitForShutdown() const noexcept
Waits for shutdown to be called.
Data-centric, broker-less publish/subscribe framework. C++ only.
std::shared_ptr< Communicator > CommunicatorPtr
A shared pointer to a Communicator.
CommunicatorPtr initialize(InitializationData initData={})
Creates a new communicator.
bool nodeOwnsCommunicator
Specifies whether or not the node owns the communicator.
Ice::CommunicatorPtr communicator
The Ice communicator used by the node. If nullptr, the node creates its own communicator.
std::function< void(std::function< void()> call)> customExecutor
An optional executor used to execute user callbacks.
std::optional< Ice::SSL::ServerAuthenticationOptions > serverAuthenticationOptions
The server authentication options used for SSL connections.
Options to configure a DataStorm node.