Class/Object

com.github.blemale.scaffeine

AsyncLoadingCache

Related Docs: object AsyncLoadingCache | package scaffeine

Permalink

class AsyncLoadingCache[K, V] extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. AsyncLoadingCache
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AsyncLoadingCache(underlying: benmanes.caffeine.cache.AsyncLoadingCache[K, V])

    Permalink

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. def get(key: K)(implicit ec: ExecutionContext): Future[V]

    Permalink

    Returns the future associated with key in this cache, obtaining that value from loader if necessary.

    Returns the future associated with key in this cache, obtaining that value from loader if necessary. If the asynchronous computation fails, the entry will be automatically removed.

    key

    key with which the specified value is to be associated

    returns

    the current (existing or computed) future value associated with the specified key

    Exceptions thrown

    java.lang.RuntimeException or Error if the loader does when constructing the future, in which case the mapping is left unestablished

  10. def get(key: K, mappingFunction: (K) ⇒ V)(implicit ec: ExecutionContext): Future[V]

    Permalink

    Returns the future associated with key in this cache, obtaining that value from mappingFunction if necessary.

    Returns the future associated with key in this cache, obtaining that value from mappingFunction if necessary. This method provides a simple substitute for the conventional "if cached, return; otherwise create, cache and return" pattern.

    key

    key with which the specified value is to be associated

    mappingFunction

    the function to asynchronously compute a value

    returns

    the current (existing or computed) future value associated with the specified key

  11. def getAll(keys: Iterable[K])(implicit ec: ExecutionContext): Future[Map[K, V]]

    Permalink

    Returns the future of a map of the values associated with keys, creating or retrieving those values if necessary.

    Returns the future of a map of the values associated with keys, creating or retrieving those values if necessary. The returned map contains entries that were already cached, combined with newly loaded entries. If the any of the asynchronous computations fail, those entries will be automatically removed.

    keys

    the keys whose associated values are to be returned

    returns

    the future containing an mapping of keys to values for the specified keys in this cache

    Exceptions thrown

    java.lang.RuntimeException or Error if the loader does so

  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def getFuture(key: K, mappingFunction: (K) ⇒ Future[V])(implicit ec: ExecutionContext): Future[V]

    Permalink

    Returns the future associated with key in this cache, obtaining that value from mappingFunction if necessary.

    Returns the future associated with key in this cache, obtaining that value from mappingFunction if necessary. This method provides a simple substitute for the conventional "if cached, return; otherwise create, cache and return" pattern.

    key

    key with which the specified value is to be associated

    mappingFunction

    the function to asynchronously compute a value

    returns

    the current (existing or computed) future value associated with the specified key

    Exceptions thrown

    java.lang.RuntimeException or Error if the mappingFunction does when constructing the future, in which case the mapping is left unestablished

  14. def getIfPresent(key: K)(implicit ec: ExecutionContext): Future[Option[V]]

    Permalink

    Returns the future associated with key in this cache, or None if there is no cached future for key.

    Returns the future associated with key in this cache, or None if there is no cached future for key.

    key

    key whose associated value is to be returned

    returns

    an option containing the current (existing or computed) future value to which the specified key is mapped, or None if this map contains no mapping for the key

  15. def hashCode(): Int

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  20. def put(key: K, valueFuture: Future[V])(implicit ec: ExecutionContext): Unit

    Permalink

    Associates value with key in this cache.

    Associates value with key in this cache. If the cache previously contained a value associated with key, the old value is replaced by value. If the asynchronous computation fails, the entry will be automatically removed.

    key

    key with which the specified value is to be associated

    valueFuture

    value to be associated with the specified key

  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. def synchronous(): LoadingCache[K, V]

    Permalink

    Returns a view of the entries stored in this cache as a synchronous LoadingCache.

    Returns a view of the entries stored in this cache as a synchronous LoadingCache. A mapping is not present if the value is currently being loaded. Modifications made to the synchronous cache directly affect the asynchronous cache. If a modification is made to a mapping that is currently loading, the operation blocks until the computation completes.

    returns

    a thread-safe synchronous view of this cache

  23. def toString(): String

    Permalink
    Definition Classes
    AsyncLoadingCache → AnyRef → Any
  24. val underlying: benmanes.caffeine.cache.AsyncLoadingCache[K, V]

    Permalink
  25. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped