Class/Object

mau

RefreshRef

Related Docs: object RefreshRef | package mau

Permalink

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. All

Instance Constructors

  1. new RefreshRef()

    Permalink

Abstract Value Members

  1. abstract def cancel: F[Boolean]

    Permalink

    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]

    Permalink
    Attributes
    protected
  3. abstract def get: F[Option[V]]

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def getOrFetch(period: FiniteDuration, staleTimeout: FiniteDuration)(fetch: F[V])(errorHandler: PartialFunction[Throwable, F[Unit]]): F[V]

    Permalink

    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 fetch

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

    Permalink

    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

  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped