Packages

class AsyncLoadingCache[K, V] extends AsyncCache[K, V]

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

Instance Constructors

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

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

    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

  9. def get(key: K, mappingFunction: (K) => V): Future[V]

    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

    Definition Classes
    AsyncCache
  10. def getAll(keys: Iterable[K]): Future[Map[K, V]]

    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

  11. def getAll(keys: Iterable[K], mappingFunction: (Iterable[K]) => Map[K, V]): Future[Map[K, V]]

    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 from this cache.

    A single request to the mappingFunction is performed for all keys which are not already present in the cache.

    keys

    the keys whose associated values are to be returned

    mappingFunction

    the function to asynchronously compute the values

    returns

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

    Definition Classes
    AsyncCache
    Exceptions thrown

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

  12. def getAllFuture(keys: Iterable[K], mappingFunction: (Iterable[K]) => Future[Map[K, V]]): Future[Map[K, V]]

    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 from this cache.

    A single request to the mappingFunction is performed for all keys which are not already present in the cache.

    keys

    the keys whose associated values are to be returned

    mappingFunction

    the function to asynchronously compute the values

    returns

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

    Definition Classes
    AsyncCache
    Exceptions thrown

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

  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. def getFuture(key: K, mappingFunction: (K) => Future[V]): Future[V]

    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

    Definition Classes
    AsyncCache
    Exceptions thrown

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

  15. def getIfPresent(key: K): Option[Future[V]]

    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

    Definition Classes
    AsyncCache
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. def put(key: K, valueFuture: Future[V]): Unit

    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

    Definition Classes
    AsyncCache
  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. def synchronous(): LoadingCache[K, V]

    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

    Definition Classes
    AsyncLoadingCacheAsyncCache
  24. def toString(): String
    Definition Classes
    AsyncLoadingCache → AnyRef → Any
  25. val underlying: benmanes.caffeine.cache.AsyncLoadingCache[K, V]
    Definition Classes
    AsyncLoadingCacheAsyncCache
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  28. 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 AsyncCache[K, V]

Inherited from AnyRef

Inherited from Any

Ungrouped