trait
BufferedObserver[-T] extends Observer[T]
Abstract Value Members
-
abstract
def
onComplete(): Unit
-
abstract
def
onError(ex: Throwable): Unit
-
abstract
def
onNext(elem: T): Future[Ack]
Concrete Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
Interface describing Observer wrappers that are thread-safe (can receive concurrent events) and that return an immediate
Continue
when receivingonNext
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 onFuture[Continue]
for sending the next event).Implementations of this interface have the following contract
onNext
/onError
/onComplete
of this interface MAY be called concurrentlyonNext
SHOULD return an immediateContinue
, as long as the buffer is not full and the underlying observer hasn't signaledCancel
(N.B. due to the asynchronous nature,Cancel
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 immediateCancel
result, after it notices that the underlying observer signaledCancel
(due to the asynchronous nature of observers, this may happen later and queued events might get dropped on the floor)Cancel
), or when a concurrent upstream data source triggered an error, this SHOULD eventually be noticed and acted uponCancel
, then implementations of this interface SHOULD not lose events in the processonError
triggered in the underlying observer coupled with aCancel
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 BufferPolicy for the buffer policies available.