Class RefreshResult.Builder<T>
java.lang.Object
software.amazon.awssdk.utils.cache.RefreshResult.Builder<T>
- All Implemented Interfaces:
Buildable
,CopyableBuilder<RefreshResult.Builder<T>,
,RefreshResult<T>> SdkBuilder<RefreshResult.Builder<T>,
RefreshResult<T>>
- Enclosing class:
RefreshResult<T>
public static final class RefreshResult.Builder<T>
extends Object
implements CopyableBuilder<RefreshResult.Builder<T>,RefreshResult<T>>
A builder for a
RefreshResult
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build aRefreshResult
using the values currently configured in this builder.prefetchTime
(Instant prefetchTime) Specify the time at which a thread that callsCachedSupplier.get()
should trigger a cache prefetch.Specify the time at which the value in this cache is stale, and all calls toCachedSupplier.get()
should block to try to update the value.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation
-
Method Details
-
staleTime
Specify the time at which the value in this cache is stale, and all calls toCachedSupplier.get()
should block to try to update the value. If this isn't specified, all threads will never block to update the value. -
prefetchTime
Specify the time at which a thread that callsCachedSupplier.get()
should trigger a cache prefetch. The exact behavior of a "prefetch" is defined when the cache is created withCachedSupplier.Builder.prefetchStrategy(CachedSupplier.PrefetchStrategy)
, and may either have one thread block to refresh the cache or have an asynchronous task reload the value in the background. If this isn't specified, the prefetch strategy will never be used and all threads will block to update the value when thestaleTime(Instant)
arrives. -
build
Build aRefreshResult
using the values currently configured in this builder.- Specified by:
build
in interfaceBuildable
- Specified by:
build
in interfaceSdkBuilder<RefreshResult.Builder<T>,
RefreshResult<T>> - Returns:
- an instance of T
-