RxOptionCache

wvlet.airframe.rx.RxOptionCache
trait RxOptionCache[A] extends RxOption[A]

An interface for enriching RxOption[A] with caching capability

Attributes

Graph
Supertypes
trait RxOption[A]
trait RxOps[Option[A]]
class Object
trait Matchable
class Any
Known subtypes
class RxOptionCacheOp[A]

Members list

Value members

Abstract methods

def expireAfterWrite(time: Long, unit: TimeUnit): RxOptionCache[A]
def getCurrent: Option[A]
def withTicker(ticker: Ticker): RxOptionCache[A]

Inherited methods

def cache[A1 >: A]: RxOptionCache[A1]

Attributes

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

Attributes

Inherited from:
RxOption
def flatMap[B](f: A => RxOps[B]): RxOption[B]

Attributes

Inherited from:
RxOption
def getOrElse[A1 >: A](default: => A1): Rx[A1]

Attributes

Inherited from:
RxOption
def getOrElseRx[A1 >: A](default: => RxOps[A1]): Rx[A1]

Attributes

Inherited from:
RxOption
protected def in: Rx[Option[A]]

Attributes

Inherited from:
RxOption
def join[B, C, D, E](b: RxOps[B], c: RxOps[C], d: RxOps[D], e: RxOps[E]): Rx[(Option[A], B, C, D, E)]

Attributes

Inherited from:
RxOption
def join[B, C, D](b: RxOps[B], c: RxOps[C], d: RxOps[D]): Rx[(Option[A], B, C, D)]

Attributes

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

Attributes

Inherited from:
RxOption
def join[B](b: RxOps[B]): Rx[(Option[A], B)]

Attributes

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

Attributes

Inherited from:
RxOption
def orElse[A1 >: A](default: => Option[A1]): RxOption[A1]

Attributes

Inherited from:
RxOption
def parents: Seq[RxOps[_]]

Attributes

Inherited from:
RxOps
def recover[U](f: PartialFunction[Throwable, U]): Rx[U]

Recover from a known error and emit a replacement value

Recover from a known error and emit a replacement value

Attributes

Inherited from:
RxOps
def recoverWith[A](f: PartialFunction[Throwable, RxOps[A]]): Rx[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:
RxOps
def run[U](effect: Option[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:
RxOps
def runContinuously[U](effect: Option[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:
RxOps
def subscribe[U](subscriber: Option[A] => U): Cancelable

Attributes

Inherited from:
RxOps
def tap(f: Option[A] => Unit): Rx[A]

Applies f to the value for having a side effect, and return the original value.

Applies f to the value for having a side effect, and return the original value.

The difference from tapOn is that this method will not receive an input failure.

Value parameters

f

side-effect function used when observing a value

Attributes

Returns

the original Rx event

Inherited from:
RxOps
def tapOn(f: PartialFunction[Try[Option[A]], Unit]): Rx[A]

Applies f to the value for having a side effect, and return the original value.

Applies f to the value for having a side effect, and return the original value.

This method is useful for debugging Rx chains. For example:

 rx.tapOn {
   case Success(v) => debug(s"received ${v}")
   case Failure(e) => error(s"request failed", e)
 }

Value parameters

f

partial function for the side effect

Attributes

Returns

the original Rx event

Inherited from:
RxOps
def tapOnFailure(f: Throwable => Unit): Rx[A]

Applies f to the error if it happens, and return the original value.

Applies f to the error if it happens, and return the original value.

This method is useful for logging the error.

Value parameters

f

side-effect function used when observing an error

Attributes

Returns

the original Rx event

Inherited from:
RxOps
def toRx: Rx[Option[A]]

Attributes

Inherited from:
RxOption
def transform[B](f: Option[A] => B): Rx[B]

Attributes

Inherited from:
RxOption
def transformOption[B](f: Option[A] => Option[B]): RxOption[B]

Attributes

Inherited from:
RxOption
def transformRx[B](f: Option[A] => RxOps[B]): Rx[B]

Attributes

Inherited from:
RxOption
def transformRxOption[B](f: Option[A] => RxOption[B]): RxOption[B]

Attributes

Inherited from:
RxOption
def when(cond: A => Boolean): RxOption[A]

An alias for filter

An alias for filter

Attributes

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

Attributes

Inherited from:
RxOption
def zip[B, C, D, E](b: RxOps[B], c: RxOps[C], d: RxOps[D], e: RxOps[E]): Rx[(Option[A], B, C, D, E)]

Attributes

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

Attributes

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

Attributes

Inherited from:
RxOption
def zip[B](b: RxOps[B]): Rx[(Option[A], B)]

Attributes

Inherited from:
RxOption