3#ifndef DATASTORM_NODE_H
4#define DATASTORM_NODE_H
11 template<
typename,
typename,
typename>
class Topic;
20 [[nodiscard]]
const char*
what() const noexcept final;
39 std::optional<std::string_view> configFile = std::nullopt,
40 std::function<
void(std::function<
void()> call)> customExecutor =
nullptr);
52 std::optional<std::string_view> configFile = std::nullopt,
53 std::function<
void(std::function<
void()> call)> customExecutor =
nullptr)
54 :
Node(argc, const_cast<const char**>(argv), configFile, std::move(customExecutor))
58#if defined(_WIN32) || defined(ICE_DOXYGEN)
69 const wchar_t* argv[],
70 std::optional<std::string_view> configFile = std::nullopt,
71 std::function<
void(std::function<
void()> call)> customExecutor =
nullptr);
84 std::optional<std::string_view> configFile = std::nullopt,
85 std::function<
void(std::function<
void()> call)> customExecutor =
nullptr)
86 :
Node(argc, const_cast<const wchar_t**>(argv), configFile, customExecutor)
97 std::optional<std::string_view> configFile = std::nullopt,
98 std::function<
void(std::function<
void()> call)> customExecutor =
nullptr);
109 std::function<
void(std::function<
void()> call)> customExecutor =
nullptr);
147 Ice::CommunicatorPtr,
148 std::function<
void(std::function<
void()> call)> customExecutor,
149 bool ownsCommunicator);
151 std::shared_ptr<DataStormI::Instance> _instance;
152 std::shared_ptr<DataStormI::TopicFactory> _factory;
153 bool _ownsCommunicator;
155 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.
Ice::CommunicatorPtr getCommunicator() const noexcept
Returns the Ice communicator associated with the node.
Node(Ice::CommunicatorPtr communicator, std::function< void(std::function< void()> call)> customExecutor=nullptr)
Constructs a DataStorm 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.
Node(int &argc, char *argv[], std::optional< std::string_view > configFile=std::nullopt, std::function< void(std::function< void()> call)> customExecutor=nullptr)
Constructs a DataStorm node.
bool isShutdown() const noexcept
Returns whether or not the node shutdown has been initiated.
void waitForShutdown() const noexcept
Waits for shutdown to be called.
Node(int &argc, const char *argv[], std::optional< std::string_view > configFile=std::nullopt, std::function< void(std::function< void()> call)> customExecutor=nullptr)
Constructs a DataStorm node.
Node(int &argc, wchar_t *argv[], std::optional< std::string_view > configFile=std::nullopt, std::function< void(std::function< void()> call)> customExecutor=nullptr)
Constructs a DataStorm node.
Node(std::optional< std::string_view > configFile=std::nullopt, std::function< void(std::function< void()> call)> customExecutor=nullptr)
Constructs a DataStorm node.
Node(int &argc, const wchar_t *argv[], std::optional< std::string_view > configFile=std::nullopt, std::function< void(std::function< void()> call)> customExecutor=nullptr)
Constructs a DataStorm node.
Data-centric, broker-less publish/subscribe framework. C++ only.
std::shared_ptr< Communicator > CommunicatorPtr
A shared pointer to a Communicator.