20 #ifndef HEDGEHOG_CORE_QUEUE_MULTI_RECEIVERS_H 21 #define HEDGEHOG_CORE_QUEUE_MULTI_RECEIVERS_H 23 #include "../../base/receiver/core_multi_receivers.h" 24 #include "core_queue_slot.h" 25 #include "core_queue_receiver.h" 32 template<
class ...NodeInputs>
50 HLOG_SELF(0,
"Creating CoreQueueMultiReceivers with type: " << (
int) type <<
" and name: " << name)
59 HLOG_SELF(2,
"Test all destinations empty")
69 std::set<CoreSlot *>
getSlots() final {
return {
this}; }
79 HLOG_SELF(0,
"Copy Cluster information from " << rhs->
name() <<
"(" << rhs->
id() <<
")")
86 #endif //HEDGEHOG_CORE_QUEUE_MULTI_RECEIVERS_H NodeType type() const
Node type accessor.
Receiver Interface, receive one data type from CoreSender.
size_t queueSize() override
Return the current waiting data queue size.
Slot of CoreQueueMultiReceiver, receiving from CoreQueueNotifier.
Multi receiver interface, gather multiple CoreReceiver.
void copyInnerStructure(CoreQueueSlot *rhs)
Copy the inner structure of the receiver (mutex, condition variable and set of notifiers) ...
CoreQueueSlot * queueSlot() final
Return the node's slot.
Slot interface, receive notification from CoreNotifier.
std::set< CoreSlot * > getSlots() final
Return a set of slots, {this}.
Receiver for nodes possessing a queue of data.
CoreQueueMultiReceivers(std::string_view const &name, NodeType const type, size_t const numberThreads)
CoreQueueMultiReceivers constructor.
NodeType
Hedgehog node's type.
bool receiverEmpty() final
Test emptiness on the queue.
Main Hedgehog core abstraction.
Multi receivers for nodes possessing a queue of data.
std::string_view const & name() const
Node name accessor.
bool receiversEmpty() final
Test emptiness of all receivers.
size_t numberThreads() const
Number of threads associated accessor.
~CoreQueueMultiReceivers() override
CoreQueueMultiReceivers destructor.
virtual std::string id() const
Unique Id accessor.
void copyInnerStructure(CoreQueueMultiReceivers< NodeInputs... > *rhs)
Copy the inner structure of all receivers and the slot from rhs to this.
size_t totalQueueSize() final
Sums the queue sizes for all receivers.