RxBlockingQueue

class RxBlockingQueue[A] extends RxSource[A]

Blocking queue implementation for supporting gRPC streaming with Rx

trait RxSource[A]
trait RxStream[A]
trait LogSupport
trait LazyLogger
trait LoggingMethods
trait Serializable
trait Rx[A]
class Object
trait Matchable
class Any

Value members

Concrete methods

def add(event: RxEvent): Unit
override def next: RxEvent
Definition Classes
override def parents: Seq[Rx[_]]
Definition Classes

Inherited methods

def andThen[B](f: A => Future[B])(implicit ex: ExecutionContext): RxStream[B]

Combine Rx stream and Future operators.

Combine Rx stream and Future operators.

This method is useful when you need to call RPC multiple times and chain the next operation after receiving the response.

Rx.intervalMillis(1000)
 .andThen { i => callRpc(...) } // Returns Future
 .map { (rpcReturnValue) => ... } // Use the Future response
Inherited from:
RxStream
def cache[A1 >: A]: RxStreamCache[A1]

Cache the last item, and emit the cached value if available.

Cache the last item, and emit the cached value if available.

The cached value will be preserved to the operator itself even after cancelling the subscription. Re-subscription of this operator will immediately return the cached value to the downstream operator.

This operator is useful if we need to involve time-consuming process, and want to reuse the last result: val v = Rx.intervalMillis(1000).map(i => (heavy process)).cache

v.map { x => ... }

Inherited from:
RxStream
def concat[A1 >: A](other: Rx[A1]): RxStream[A1]
Inherited from:
RxStream
inline protected def debug(inline message: Any, inline cause: Throwable): Unit
Inherited from:
LoggingMethods
inline protected def debug(inline message: Any): Unit
Inherited from:
LoggingMethods
inline protected def error(inline message: Any, inline cause: Throwable): Unit
Inherited from:
LoggingMethods
inline protected def error(inline message: Any): Unit
Inherited from:
LoggingMethods
def filter(f: A => Boolean): RxStream[A]
Inherited from:
RxStream
def flatMap[B](f: A => Rx[B]): RxStream[B]
Inherited from:
RxStream
inline protected def info(inline message: Any, inline cause: Throwable): Unit
Inherited from:
LoggingMethods
inline protected def info(inline message: Any): Unit
Inherited from:
LoggingMethods
def join[B, C, D](b: Rx[B], c: Rx[C], d: Rx[D]): RxStream[(A, B, C, D)]
Inherited from:
RxStream
def join[B, C](b: Rx[B], c: Rx[C]): RxStream[(A, B, C)]
Inherited from:
RxStream
def join[B](other: Rx[B]): RxStream[(A, B)]

Emit a new output if one of Rx[A] or Rx[B] is changed.

Emit a new output if one of Rx[A] or Rx[B] is changed.

This method is useful when you need to monitor multiple Rx objects.

Using joins will be more intuitive than nesting multiple Rx operators like Rx[A].map { x => ... Rx[B].map { ...} }.

Inherited from:
RxStream
Inherited from:
RxStream
inline protected def logAt(inline logLevel: LogLevel, inline message: Any): Unit
Inherited from:
LoggingMethods
def map[B](f: A => B): RxStream[B]
Inherited from:
RxStream
def recover[U](f: PartialFunction[Throwable, U]): RxStream[U]

Recover from a known error and emit a replacement value

Recover from a known error and emit a replacement value

Inherited from:
Rx
def recoverWith[A](f: PartialFunction[Throwable, Rx[A]]): RxStream[A]

Recover from a known error and emit replacement values from a given Rx

Recover from a known error and emit replacement values from a given Rx

Inherited from:
Rx
def run[U](effect: A => U): Cancelable

Evaluate this Rx[A] and apply the given effect function. Once OnError(e) or OnCompletion is observed, it will stop the evaluation.

Evaluate this Rx[A] and apply the given effect function. Once OnError(e) or OnCompletion is observed, it will stop the evaluation.

Inherited from:
Rx
def runContinuously[U](effect: A => U): Cancelable

Keep evaluating Rx[A] even if OnError(e) or OnCompletion is reported. This is useful for keep processing streams.

Keep evaluating Rx[A] even if OnError(e) or OnCompletion is reported. This is useful for keep processing streams.

Inherited from:
Rx
def sample(timeWindow: Long, unit: TimeUnit): RxStream[A]

Emit the most recent item of the source within periodic time intervals.

Emit the most recent item of the source within periodic time intervals.

Inherited from:
RxStream
def startWith[A1 >: A](lst: Seq[A1]): RxStream[A1]

Emit the given items first before returning the items from the source.

Emit the given items first before returning the items from the source.

Inherited from:
RxStream
def startWith[A1 >: A](a: A1): RxStream[A1]

Emit the given item first before returning the items from the source.

Emit the given item first before returning the items from the source.

Inherited from:
RxStream
def subscribe[U](subscriber: A => U): Cancelable
Inherited from:
Rx
def take(n: Long): RxStream[A]

Take an event up to n elements. This may receive fewer events than n if the upstream operator completes before generating n elements.

Take an event up to n elements. This may receive fewer events than n if the upstream operator completes before generating n elements.

Inherited from:
RxStream
def throttleFirst(timeWindow: Long, unit: TimeUnit): RxStream[A]

Emit the first item of the source within each sampling period. This is useful, for example, to prevent double-clicks of buttons.

Emit the first item of the source within each sampling period. This is useful, for example, to prevent double-clicks of buttons.

Inherited from:
RxStream
def throttleLast(timeWindow: Long, unit: TimeUnit): RxStream[A]

Emit the most recent item of the source within periodic time intervals.

Emit the most recent item of the source within periodic time intervals.

Inherited from:
RxStream
def toOption[X, A1 >: A](implicit ev: A1 <:< Option[X]): RxOption[X]
Inherited from:
RxStream
override def toRxStream: RxStream[A]
Definition Classes
Inherited from:
RxStream
def toSeq: Seq[A]

Materialize the stream as Seq[A]. This works only for the finite stream and for Scala JVM.

Materialize the stream as Seq[A]. This works only for the finite stream and for Scala JVM.

Inherited from:
Rx
inline protected def trace(inline message: Any, inline cause: Throwable): Unit
Inherited from:
LoggingMethods
inline protected def trace(inline message: Any): Unit
Inherited from:
LoggingMethods
inline protected def warn(inline message: Any, inline cause: Throwable): Unit
Inherited from:
LoggingMethods
inline protected def warn(inline message: Any): Unit
Inherited from:
LoggingMethods
def withFilter(f: A => Boolean): RxStream[A]
Inherited from:
RxStream
def withName(name: String): RxStream[A]
Inherited from:
RxStream
def zip[B, C, D](b: Rx[B], c: Rx[C], d: Rx[D]): RxStream[(A, B, C, D)]
Inherited from:
RxStream
def zip[B, C](b: Rx[B], c: Rx[C]): RxStream[(A, B, C)]
Inherited from:
RxStream
def zip[B](other: Rx[B]): RxStream[(A, B)]

Combine two Rx streams to form a sequence of pairs. This will emit a new pair when both of the streams are updated.

Combine two Rx streams to form a sequence of pairs. This will emit a new pair when both of the streams are updated.

Inherited from:
RxStream