public static final class CachedSupplier.Builder<T> extends Object
CachedSupplier
, created by CachedSupplier.builder(Supplier)
.Modifier and Type | Method and Description |
---|---|
CachedSupplier<T> |
build()
Create a
CachedSupplier using the current configuration of this builder. |
CachedSupplier.Builder<T> |
prefetchStrategy(CachedSupplier.PrefetchStrategy prefetchStrategy)
Configure the way in which data in the cache should be pre-fetched when the data's
RefreshResult.prefetchTime()
arrives. |
public CachedSupplier.Builder<T> prefetchStrategy(CachedSupplier.PrefetchStrategy prefetchStrategy)
RefreshResult.prefetchTime()
arrives.
By default, this uses the OneCallerBlocks
strategy, which will block a single CachedSupplier.get()
caller to update
the value.public CachedSupplier<T> build()
CachedSupplier
using the current configuration of this builder.Copyright © 2019. All rights reserved.