State for a single path to a sink of a downstream_manager
.
More...
#include <outbound_path.hpp>
|
| outbound_path (stream_slot sender_slot, strong_actor_ptr receiver_hdl) |
| Constructs a pending path for given slot and handle.
|
|
void | emit_batch (local_actor *self, int32_t xs_size, message xs) |
| Sends a downstream_msg::batch on this path. More...
|
|
template<class Iterator > |
Iterator | emit_batches_impl (local_actor *self, Iterator i, Iterator e, bool force_underfull) |
|
template<class T > |
void | emit_batches (local_actor *self, std::vector< T > &cache, bool force_underfull) |
| Calls emit_batch for each chunk in the cache, whereas each chunk is of size desired_batch_size . More...
|
|
void | emit_regular_shutdown (local_actor *self) |
| Sends a downstream_msg::close on this path.
|
|
void | emit_irregular_shutdown (local_actor *self, error reason) |
| Sends a downstream_msg::forced_close on this path.
|
|
bool | pending () const noexcept |
| Returns whether this path is pending, i.e., didn't receive an ack_open yet. More...
|
|
bool | clean () const noexcept |
| Returns whether no pending ACKs exist.
|
|
void | set_desired_batch_size (int32_t value) noexcept |
|
|
static constexpr const auto | aborter_type = stream_aborter::sink_aborter |
| Stream aborter flag to monitor a path.
|
|
|
(Note that these are not member functions.)
|
template<class Inspector > |
bool | inspect (Inspector &f, outbound_path &x) |
|
State for a single path to a sink of a downstream_manager
.
◆ emit_batch()
Sends a downstream_msg::batch
on this path.
Decrements open_credit
by xs_size
and increments next_batch_id
by 1.
◆ emit_batches()
template<class T >
void caf::outbound_path::emit_batches |
( |
local_actor * |
self, |
|
|
std::vector< T > & |
cache, |
|
|
bool |
force_underfull |
|
) |
| |
Calls emit_batch
for each chunk in the cache, whereas each chunk is of size desired_batch_size
.
Does nothing for pending paths.
◆ pending()
bool caf::outbound_path::pending |
( |
| ) |
const |
|
noexcept |
Returns whether this path is pending, i.e., didn't receive an ack_open
yet.
◆ inspect()
template<class Inspector >
◆ closing
bool caf::outbound_path::closing |
Stores whether an outbound path is marked for removal.
The downstream_manger
no longer sends new batches to a closing path, but buffered batches are still shipped. The owning stream_manager
removes the path when receiving an upstream_msg::ack_batch
and no pending batches for this path exist.
◆ next_ack_id
int64_t caf::outbound_path::next_ack_id |
ID of the first unacknowledged batch.
Note that CAF uses accumulative ACKs, i.e., receiving an ACK with a higher ID is not an error.
The documentation for this class was generated from the following file:
- libcaf_core/caf/outbound_path.hpp