libcaf
0.15.5
|
State for a single path to a sink on a stream_scatterer
.
More...
#include <outbound_path.hpp>
Classes | |
struct | client_data |
Stores information about the initiator of the steam. More... | |
Public Types | |
using | regular_shutdown = stream_msg::close |
Message type for propagating graceful shutdowns. | |
using | irregular_shutdown = stream_msg::forced_close |
Message type for propagating errors. | |
Public Member Functions | |
outbound_path (local_actor *selfptr, const stream_id &id, strong_actor_ptr ptr) | |
Constructs a path for given handle and stream ID. | |
void | handle_ack_open (long initial_credit) |
Sets open_credit to initial_credit and clears cached_handshake . | |
void | emit_open (strong_actor_ptr origin, mailbox_element::forwarding_stack stages, message_id mid, message handshake_data, stream_priority prio, bool is_redeployable) |
void | emit_batch (long xs_size, message xs) |
Emits a stream_msg::batch on this path, decrements open_credit by xs_size and increments next_batch_id by 1. More... | |
Static Public Member Functions | |
static void | emit_irregular_shutdown (local_actor *self, const stream_id &sid, const strong_actor_ptr &hdl, error reason) |
Public Attributes | |
local_actor * | self |
Pointer to the parent actor. | |
stream_id | sid |
Stream ID used by the sink. | |
strong_actor_ptr | hdl |
Handle to the sink. | |
int64_t | next_batch_id |
Next expected batch ID. | |
long | open_credit |
Currently available credit for this path. | |
bool | redeployable |
Stores whether the downstream actor is failsafe, i.e., allows the runtime to redeploy it on failure. More... | |
int64_t | next_ack_id |
Next expected batch ID to be acknowledged. More... | |
std::deque< std::pair< int64_t, stream_msg::batch > > | unacknowledged_batches |
Caches batches until receiving an ACK. | |
client_data | cd |
Caches the initiator of the stream (client) with the original request ID until the stream handshake is either confirmed or aborted. More... | |
error | shutdown_reason |
Stores whether an error occurred during stream processing. | |
Static Public Attributes | |
static constexpr const auto | aborter_type = stream_aborter::sink_aborter |
Stream aborter flag to monitor a path. | |
State for a single path to a sink on a stream_scatterer
.
void caf::outbound_path::emit_batch | ( | long | xs_size, |
message | xs | ||
) |
Emits a stream_msg::batch
on this path, decrements open_credit
by xs_size
and increments next_batch_id
by 1.
client_data caf::outbound_path::cd |
Caches the initiator of the stream (client) with the original request ID until the stream handshake is either confirmed or aborted.
Once confirmed, the next stage takes responsibility for answering to the client.
int64_t caf::outbound_path::next_ack_id |
Next expected batch ID to be acknowledged.
Actors can receive a more advanced batch ID in an ACK message, since CAF uses accumulative ACKs.
bool caf::outbound_path::redeployable |
Stores whether the downstream actor is failsafe, i.e., allows the runtime to redeploy it on failure.
If this field is set to false
then unacknowledged_batches
is unused.