Packages

abstract class RefreshRef[F[_], V] extends AnyRef

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RefreshRef
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new RefreshRef()

Abstract Value Members

  1. abstract def cancel: F[Boolean]

    Cancel polling and remove data from memory

    Cancel polling and remove data from memory

    returns

    true if there was data and polling, false if it's empty

  2. abstract def get(period: FiniteDuration, staleTimeoutO: Option[FiniteDuration])(fetch: F[V])(errorHandler: PartialFunction[Throwable, F[Unit]]): F[V]
    Attributes
    protected
  3. abstract def get: F[Option[V]]

    Simply gets the data from memory

    Simply gets the data from memory

    returns

    Some(v) if exists, None if not

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. def getOrFetch(period: FiniteDuration, staleTimeout: FiniteDuration)(fetch: F[V])(errorHandler: PartialFunction[Throwable, F[Unit]]): F[V]

    Like getOrFetch(period: FiniteDuration)(fetch: F[V]) but with added resilency against failures in fetch.

    Like getOrFetch(period: FiniteDuration)(fetch: F[V]) but with added resilency against failures in fetch.

    After staleTimeout of continuous polling failures, the polling will stop and data removed. A success fetch resets the timer.

    period

    if set to zero will simply return fetch

    staleTimeout

    timeout after the last successful fetchRepeatingSuite.scala

  10. def getOrFetch(period: FiniteDuration)(fetch: F[V]): F[V]

    Either gets the data from the memory if available, or use the fetch to retrieve the data, and setup a polling every period to update the data in memory using fetch.

    Either gets the data from the memory if available, or use the fetch to retrieve the data, and setup a polling every period to update the data in memory using fetch. Hence the first call to ref.getOrFetch will take longer to actually load the data from upstream to memory. Subsequent call will always return the data from memory.

    When any exception occurs during getDataFromUpstream, the refresh stops, and the data is removed from the memory. All subsequent requests will incure effect in fetch, whose failure will be surfaced, until it succeeds.

    period

    if set to zero will simply return fetch

  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  20. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped