Class RefreshResult<T>
java.lang.Object
software.amazon.awssdk.utils.cache.RefreshResult<T>
- All Implemented Interfaces:
ToCopyableBuilder<RefreshResult.Builder<T>,
RefreshResult<T>>
public final class RefreshResult<T>
extends Object
implements ToCopyableBuilder<RefreshResult.Builder<T>,RefreshResult<T>>
A wrapper for the value returned by the
Supplier
underlying a CachedSupplier
. The underlying Supplier
returns this to specify when the underlying value should be refreshed.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> RefreshResult.Builder
<T> builder
(T value) Get a builder for creating aRefreshResult
.When the configured value is getting close to stale and should be updated using the supplier'sCachedSupplier.prefetchStrategy
.When the configured value is stale and should no longer be used.Take this object and create a builder that contains all of the current property values of this object.value()
The value resulting from the refresh.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.ToCopyableBuilder
copy
-
Method Details
-
builder
Get a builder for creating aRefreshResult
.- Parameters:
value
- The value that should be cached by the supplier.
-
value
The value resulting from the refresh. -
staleTime
When the configured value is stale and should no longer be used. All threads will block until the value is updated. -
prefetchTime
When the configured value is getting close to stale and should be updated using the supplier'sCachedSupplier.prefetchStrategy
. -
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<RefreshResult.Builder<T>,
RefreshResult<T>> - Returns:
- a builder for type T
-