TimerOp

wvlet.airframe.rx.Rx$.TimerOp
case class TimerOp(interval: Long, unit: TimeUnit) extends RxStream[Long]

Attributes

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

Members list

Concise view

Value members

Concrete methods

override def parents: Seq[Rx[_]]

Attributes

Definition Classes

Inherited methods

def andThen[B](f: Long => 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 >: Long]: 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 >: Long](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: Long => Boolean): RxStream[A]

Attributes

Inherited from:
RxStream
def flatMap[B](f: Long => 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: Long => B): RxStream[B]

Attributes

Inherited from:
RxStream
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: Long => 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: Long => 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 >: Long](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 >: Long](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: Long => 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 >: Long](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: Long => 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