Scala API: attach the two given stages such that the command output of the first is fed into the command input of the second, and the event output of the second is fed into the event input of the first.
Scala API: attach the two given stages such that the command output of the first is fed into the command input of the second, and the event output of the second is fed into the event input of the first. In other words: sequence the stages such that the left one is on top of the right one.
the right or lower pipeline stage
a pipeline stage representing the sequence of the two stages
Implement this method to generate this stage’s pair of command and event functions.
Implement this method to generate this stage’s pair of command and event functions.
INTERNAL API: do not use this method to instantiate a pipeline!
AbstractSymmetricPipePair
AbstractPipePair
PipelineFactory
Scala API: combine the two stages such that the command pipeline of the left stage is used and the event pipeline of the right, discarding the other two sub-pipelines.
Scala API: combine the two stages such that the command pipeline of the left stage is used and the event pipeline of the right, discarding the other two sub-pipelines.
the event pipeline
a pipeline stage using the left command pipeline and the right event pipeline
This pipeline stage implements a configurable buffer for transforming the per-write ACK/NACK-based backpressure model of a TCP connection actor into an edge-triggered back-pressure model: the upper stages will receive notification when the buffer runs full (BackpressureBuffer.HighWatermarkReached) and when it subsequently empties (BackpressureBuffer.LowWatermarkReached). The upper layers should respond by not generating more writes when the buffer is full. There is also a hard limit upon which this buffer will abort the connection.
All limits are configurable and are given in number of bytes. The
highWatermark
should be set such that the amount of data generated before reception of the asynchronous BackpressureBuffer.HighWatermarkReached notification does not lead to exceeding themaxCapacity
hard limit; if the writes may arrive in bursts then the difference between these two should allow for at least one burst to be sent after the high watermark has been reached. ThelowWatermark
must be less than or equal to thehighWatermark
, where the difference between these two defines the hysteresis, i.e. how often these notifications are sent out (i.e. if the difference is rather large then it will take some time for the buffer to empty below the low watermark, and that room is then available for data sent in response to the BackpressureBuffer.LowWatermarkReached notification; if the difference was small then the buffer would more quickly oscillate between these two limits).