NamedOp

wvlet.airframe.rx.Rx$.NamedOp
case class NamedOp[A](input: Rx[A], name: String) extends UnaryRx[A, A]

Attributes

Graph
Supertypes
trait Product
trait Equals
class UnaryRx[A, A]
trait RxStream[A]
trait LogSupport
trait LazyLogger
trait LoggingMethods
trait Serializable
trait Rx[A]
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns:

a string representation of the object.

Definition Classes
Any

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

Attributes

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 => ... }

Attributes

Inherited from:
RxStream
def concat[A1 >: A](other: Rx[A1]): RxStream[A1]

Attributes

Inherited from:
RxStream
inline protected def debug(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def debug(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def error(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def error(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
def filter(f: A => Boolean): RxStream[A]

Attributes

Inherited from:
RxStream
def flatMap[B](f: A => Rx[B]): RxStream[B]

Attributes

Inherited from:
RxStream
inline protected def info(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def info(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
def join[B, C, D](b: Rx[B], c: Rx[C], d: Rx[D]): RxStream[(A, B, C, D)]

Attributes

Inherited from:
RxStream
def join[B, C](b: Rx[B], c: Rx[C]): RxStream[(A, B, C)]

Attributes

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 { ...} }.

Attributes

Inherited from:
RxStream

Attributes

Inherited from:
RxStream
inline protected def logAt(inline logLevel: LogLevel, inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
def map[B](f: A => B): RxStream[B]

Attributes

Inherited from:
RxStream
override def parents: Seq[Rx[_]]

Attributes

Definition Classes
Inherited from:
UnaryRx
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
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

Attributes

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

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

Inherited from:
RxStream
def toOption[X, A1 >: A](implicit ev: A1 <:< Option[X]): RxOption[X]

Attributes

Inherited from:
RxStream
override def toRxStream: RxStream[A]

Attributes

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.

Attributes

Inherited from:
Rx
inline protected def trace(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def trace(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def warn(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def warn(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
def withFilter(f: A => Boolean): RxStream[A]

Attributes

Inherited from:
RxStream
def withName(name: String): RxStream[A]

Attributes

Inherited from:
RxStream
def zip[B, C, D](b: Rx[B], c: Rx[C], d: Rx[D]): RxStream[(A, B, C, D)]

Attributes

Inherited from:
RxStream
def zip[B, C](b: Rx[B], c: Rx[C]): RxStream[(A, B, C)]

Attributes

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.

Attributes

Inherited from:
RxStream