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 with which the specified value is to be associated
the current (existing or computed) future value associated with the specified key
java.lang.RuntimeException
or Error if the loader
does when constructing the future,
in which case the mapping is left unestablished
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 with which the specified value is to be associated
the function to asynchronously compute a value
the current (existing or computed) future value associated with the specified key
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.
the keys whose associated values are to be returned
the future containing an mapping of keys to values for the specified keys in this cache
java.lang.RuntimeException
or Error if the loader
does so
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 with which the specified value is to be associated
the function to asynchronously compute a value
the current (existing or computed) future value associated with the specified key
java.lang.RuntimeException
or Error if the mappingFunction does when constructing the future,
in which case the mapping is left unestablished
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 whose associated value is to be returned
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
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 with which the specified value is to be associated
value to be associated with the specified key
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.
a thread-safe synchronous view of this cache