libcaf
0.15.5
|
A scatterer that delegates to any number of sub-scatterers. More...
#include <fused_scatterer.hpp>
Public Types | |
using | substreams_tuple = std::tuple< T, Ts... > |
using | pointer = stream_scatterer * |
using | const_pointer = const pointer |
using | iterator = pointer * |
using | const_iterator = const pointer * |
![]() | |
using | path_type = outbound_path |
using | path_ptr = path_type * |
Public Member Functions | |
fused_scatterer (local_actor *self) | |
path_ptr | add_path (const stream_id &sid, strong_actor_ptr origin, strong_actor_ptr sink_ptr, mailbox_element::forwarding_stack stages, message_id handshake_mid, message handshake_data, stream_priority prio, bool redeployable) override |
Adds a path to the edge. More... | |
path_ptr | confirm_path (const stream_id &sid, const actor_addr &from, strong_actor_ptr to, long initial_demand, bool redeployable) override |
Adds a path to a sink and initiates the handshake. | |
bool | remove_path (const stream_id &sid, const actor_addr &addr, error reason, bool silent) override |
Removes a path from the scatterer. | |
bool | paths_clean () const override |
Returns true if there is no data pending and no unacknowledged batch on any path. More... | |
void | close () override |
Removes all paths gracefully. | |
void | abort (error reason) override |
Removes all paths with an error message. | |
long | num_paths () const override |
Returns the number of paths managed on this edge. | |
bool | closed () const override |
Returns true if no downstream exists, false otherwise. | |
bool | continuous () const override |
Returns whether this edge remains open after the last path is removed. | |
void | continuous (bool value) override |
Sets whether this edge remains open after the last path is removed. | |
void | emit_batches () override |
Sends batches to sinks. | |
path_ptr | find (const stream_id &sid, const actor_addr &x) override |
Returns the stored state for x if x is a known path and associated to sid , otherwise nullptr . More... | |
path_ptr | path_at (size_t idx) override |
Returns the stored state for x if x is a known path and associated to sid , otherwise nullptr . More... | |
long | credit () const override |
Returns the currently available credit, depending on the policy in use. More... | |
long | buffered () const override |
Returns the size of the output buffer. | |
long | min_batch_size () const override |
Minimum amount of messages required to emit a batch. More... | |
long | max_batch_size () const override |
Maximum amount of messages to put into a single batch. More... | |
long | min_buffer_size () const override |
Minimum amount of messages we wish to store at the actor in order to emit new batches immediately when receiving new downstream demand. More... | |
duration | max_batch_delay () const override |
Forces to actor to emit a batch even if the minimum batch size was not reached. More... | |
void | min_batch_size (long x) override |
Minimum amount of messages required to emit a batch. More... | |
void | max_batch_size (long x) override |
Maximum amount of messages to put into a single batch. More... | |
void | min_buffer_size (long x) override |
Minimum amount of messages we wish to store at the actor in order to emit new batches immediately when receiving new downstream demand. More... | |
void | max_batch_delay (duration x) override |
Forces to actor to emit a batch even if the minimum batch size was not reached. More... | |
template<class... Us> | |
void | push (Us &&... xs) |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
T & | main_stream () |
const T & | main_stream () const |
template<size_t I> | |
std::tuple_element< I, substreams_tuple >::type & | substream () |
template<size_t I> | |
const std::tuple_element< I, substreams_tuple >::type & | substream () const |
stream_scatterer * | substream_by_handshake_type (const message &msg) |
![]() | |
bool | remove_path (const stream_id &sid, const strong_actor_ptr &x, error reason, bool silent) |
Removes a path from the scatterer. | |
path_ptr | find (const stream_id &sid, const strong_actor_ptr &x) |
Convenience function for calling find(x, actor_cast<actor_addr>(x)) . | |
A scatterer that delegates to any number of sub-scatterers.
Data is only pushed to the main scatterer T
per default.
|
overridevirtual |
Adds a path to the edge.
nullptr
otherwise. Implements caf::stream_scatterer.
|
overridevirtual |
Returns the currently available credit, depending on the policy in use.
For example, a broadcast policy would return the minimum of all available downstream credits.
Implements caf::stream_scatterer.
|
overridevirtual |
Returns the stored state for x
if x
is a known path and associated to sid
, otherwise nullptr
.
Implements caf::stream_scatterer.
|
overridevirtual |
Forces to actor to emit a batch even if the minimum batch size was not reached.
Implements caf::stream_scatterer.
|
overridevirtual |
Forces to actor to emit a batch even if the minimum batch size was not reached.
Implements caf::stream_scatterer.
|
overridevirtual |
Maximum amount of messages to put into a single batch.
Causes the actor to split a buffer into more batches if necessary.
Implements caf::stream_scatterer.
|
overridevirtual |
Maximum amount of messages to put into a single batch.
Causes the actor to split a buffer into more batches if necessary.
Implements caf::stream_scatterer.
|
overridevirtual |
Minimum amount of messages required to emit a batch.
A value of 0 disables batch delays.
Implements caf::stream_scatterer.
|
overridevirtual |
Minimum amount of messages required to emit a batch.
A value of 0 disables batch delays.
Implements caf::stream_scatterer.
|
overridevirtual |
Minimum amount of messages we wish to store at the actor in order to emit new batches immediately when receiving new downstream demand.
Implements caf::stream_scatterer.
|
overridevirtual |
Minimum amount of messages we wish to store at the actor in order to emit new batches immediately when receiving new downstream demand.
Implements caf::stream_scatterer.
|
overridevirtual |
Returns the stored state for x
if x
is a known path and associated to sid
, otherwise nullptr
.
Implements caf::stream_scatterer.
|
overridevirtual |
Returns true
if there is no data pending and no unacknowledged batch on any path.
Implements caf::stream_scatterer.