libcaf
0.15.5
|
Special-purpose scatterer for sinks that terminate a stream. More...
#include <terminal_stream_scatterer.hpp>
Public Member Functions | |
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 &x, 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. | |
path_type * | path_at (size_t index) override |
Returns the stored state for x if x is a known path and associated to sid , otherwise nullptr . More... | |
void | emit_batches () override |
Sends batches to sinks. | |
path_type * | 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... | |
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... | |
![]() | |
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)) . | |
Additional Inherited Members | |
![]() | |
using | path_type = outbound_path |
using | path_ptr = path_type * |
Special-purpose scatterer for sinks that terminate a stream.
A terminal stream scatterer generates credit without downstream actors.
|
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.