Packages

trait BufferedSubscriber[-A] extends Subscriber[A]

Interface describing Observer wrappers that are thread-safe (can receive concurrent events) and that return an immediate Continue when receiving onNext events. Meant to be used by data sources that cannot uphold the no-concurrent events and the back-pressure related requirements (i.e. data-sources that cannot wait on Future[Ack] for sending the next event).

Implementations of this interface have the following contract:

  • onNext / onError / onComplete of this interface MAY be called concurrently
  • onNext SHOULD return an immediate Continue, as long as the buffer is not full and the underlying observer hasn't signaled Stop (N.B. due to the asynchronous nature, Stop signaled by the underlying observer may be noticed later, so implementations of this interface make no guarantee about queued events - which could be generated, queued and dropped on the floor later)
  • onNext MUST return an immediate Stop result, after it notices that the underlying observer signaled Stop (due to the asynchronous nature of observers, this may happen later and queued events might get dropped on the floor)
  • in general the contract for the underlying Observer is fully respected (grammar, non-concurrent notifications, etc...)
  • when the underlying observer canceled (by returning Stop), or when a concurrent upstream data source triggered an error, this SHOULD eventually be noticed and acted upon
  • as long as the buffer isn't full and the underlying observer isn't Stop, then implementations of this interface SHOULD not lose events in the process
  • the buffer MAY BE either unbounded or bounded, in case of bounded buffers, then an appropriate overflowStrategy needs to be set for when the buffer overflows - either an onError triggered in the underlying observer coupled with a Stop signaled to the upstream data sources, or dropping events from the head or the tail of the queue, or attempting to apply back-pressure, etc...

See OverflowStrategy for the buffer policies available.

Source
BufferedSubscriber.scala
Linear Supertypes
Subscriber[A], Observer[A], Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BufferedSubscriber
  2. Subscriber
  3. Observer
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def onComplete(): Unit
    Definition Classes
    Observer
  2. abstract def onError(ex: Throwable): Unit
    Definition Classes
    Observer
  3. abstract def onNext(elem: A): Future[Ack]
    Definition Classes
    Observer
  4. implicit abstract def scheduler: Scheduler
    Definition Classes
    Subscriber

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Subscriber[A]

Inherited from Observer[A]

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped