libcaf  0.15.5
Public Member Functions | List of all members
caf::invalid_stream_gatherer Class Reference

Type-erased policy for receiving data from sources. More...

#include <invalid_stream_gatherer.hpp>

Inheritance diagram for caf::invalid_stream_gatherer:
caf::stream_gatherer

Public Member Functions

path_ptr add_path (const stream_id &sid, strong_actor_ptr x, strong_actor_ptr original_stage, stream_priority prio, long available_credit, bool redeployable, response_promise result_cb) override
 Adds a path to the edge and emits ack_open to the source. More...
 
bool remove_path (const stream_id &sid, const actor_addr &x, error reason, bool silent) override
 Removes a path from the gatherer.
 
void close (message reason) 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_ptr 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...
 
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...
 
long high_watermark () const override
 Returns the point at which an actor stops sending out demand immediately (waiting for the available credit to first drop below the watermark). More...
 
long min_credit_assignment () const override
 Returns the minimum amount of credit required to send a demand message.
 
long max_credit () const override
 Returns the maximum credit assigned to a single upstream actors.
 
void high_watermark (long x) override
 Sets the point at which an actor stops sending out demand immediately (waiting for the available credit to first drop below the watermark). More...
 
void min_credit_assignment (long x) override
 Sets the minimum amount of credit required to send a demand message.
 
void max_credit (long x) override
 Sets the maximum credit assigned to a single upstream actors.
 
void assign_credit (long downstream_capacity) override
 Assigns new credit to all sources.
 
long initial_credit (long downstream_capacity, path_type *x) override
 
- Public Member Functions inherited from caf::stream_gatherer
virtual long initial_credit (long downstream_capacity, path_ptr x)=0
 Calculates initial credit for x after adding it to the gatherer.
 
bool remove_path (const stream_id &sid, const strong_actor_ptr &x, error reason, bool silent)
 Removes a path from the gatherer.
 
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

- Public Types inherited from caf::stream_gatherer
using path_type = inbound_path
 Type of a single path to a data source.
 
using path_ptr = path_type *
 Pointer to a single path to a data source.
 

Detailed Description

Type-erased policy for receiving data from sources.

Member Function Documentation

path_ptr caf::invalid_stream_gatherer::add_path ( const stream_id &  sid,
strong_actor_ptr  x,
strong_actor_ptr  original_stage,
stream_priority  prio,
long  available_credit,
bool  redeployable,
response_promise  result_cb 
)
overridevirtual

Adds a path to the edge and emits ack_open to the source.

Parameters
sidStream ID used by the source.
xHandle to the source.
original_stageActor that received the stream handshake initially.
prioPriority of data on this path.
available_creditMaximum credit for granting to the source.
redeployableStores whether the source can re-appear after aborts.
result_cbCallback for the listener of the final stream result. The gatherer must ignore the promise when returning nullptr, because the previous stage is responsible for it until the gatherer acknowledges the handshake. The callback is invalid if the stream has a next stage.
Returns
The added path on success, nullptr otherwise.

Implements caf::stream_gatherer.

path_ptr caf::invalid_stream_gatherer::find ( const stream_id &  sid,
const actor_addr x 
)
overridevirtual

Returns the stored state for x if x is a known path and associated to sid, otherwise nullptr.

Implements caf::stream_gatherer.

long caf::invalid_stream_gatherer::high_watermark ( ) const
overridevirtual

Returns the point at which an actor stops sending out demand immediately (waiting for the available credit to first drop below the watermark).

Implements caf::stream_gatherer.

void caf::invalid_stream_gatherer::high_watermark ( long  x)
overridevirtual

Sets the point at which an actor stops sending out demand immediately (waiting for the available credit to first drop below the watermark).

Implements caf::stream_gatherer.

path_ptr caf::invalid_stream_gatherer::path_at ( size_t  index)
overridevirtual

Returns the stored state for x if x is a known path and associated to sid, otherwise nullptr.

Implements caf::stream_gatherer.


The documentation for this class was generated from the following file: