Class/Object

eventstore.pipeline

BackpressureBuffer

Related Docs: object BackpressureBuffer | package pipeline

Permalink

class BackpressureBuffer extends PipelineStage[HasLogging, Command, Command, akka.io.Tcp.Event, akka.io.Tcp.Event]

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 the maxCapacity 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. The lowWatermark must be less than or equal to the highWatermark, 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).

Linear Supertypes
PipelineStage[HasLogging, Command, Command, akka.io.Tcp.Event, akka.io.Tcp.Event], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BackpressureBuffer
  2. PipelineStage
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BackpressureBuffer(lowBytes: Long, highBytes: Long, maxBytes: Long)

    Permalink

Type Members

  1. case class Ack(num: Int, ack: akka.io.Tcp.Event) extends akka.io.Tcp.Event with NoSerializationVerificationNeeded with Product with Serializable

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def >>[CmdBelowBelow, EvtBelowBelow, BelowContext <: HasLogging](right: PipelineStage[_ >: BelowContext, Command, CmdBelowBelow, akka.io.Tcp.Event, EvtBelowBelow]): PipelineStage[BelowContext, Command, CmdBelowBelow, akka.io.Tcp.Event, EvtBelowBelow]

    Permalink

    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.

    right

    the right or lower pipeline stage

    returns

    a pipeline stage representing the sequence of the two stages

    Definition Classes
    PipelineStage
  5. def apply(ctx: HasLogging): PipePair[Command, Command, akka.io.Tcp.Event, akka.io.Tcp.Event] { ... /* 2 definitions in type refinement */ }

    Permalink

    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!

    Definition Classes
    BackpressureBufferPipelineStage
    See also

    AbstractSymmetricPipePair

    AbstractPipePair

    PipelineFactory

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. def |[RightContext <: HasLogging](right: PipelineStage[_ >: RightContext, Command, Command, akka.io.Tcp.Event, akka.io.Tcp.Event]): PipelineStage[RightContext, Command, Command, akka.io.Tcp.Event, akka.io.Tcp.Event]

    Permalink

    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.

    right

    the event pipeline

    returns

    a pipeline stage using the left command pipeline and the right event pipeline

    Definition Classes
    PipelineStage

Inherited from PipelineStage[HasLogging, Command, Command, akka.io.Tcp.Event, akka.io.Tcp.Event]

Inherited from AnyRef

Inherited from Any

Ungrouped