public final class RefreshResult<T> extends Object implements ToCopyableBuilder<RefreshResult.Builder<T>,RefreshResult<T>>
Supplier underlying a CachedSupplier. The underlying Supplier
returns this to specify when the underlying value should be refreshed.| Modifier and Type | Class and Description |
|---|---|
static class |
RefreshResult.Builder<T>
A builder for a
RefreshResult. |
| Modifier and Type | Method and Description |
|---|---|
static <T> RefreshResult.Builder<T> |
builder(T value)
Get a builder for creating a
RefreshResult. |
Instant |
prefetchTime()
When the configured value is getting close to stale and should be updated using the supplier's
CachedSupplier.prefetchStrategy. |
Instant |
staleTime()
When the configured value is stale and should no longer be used.
|
RefreshResult.Builder<T> |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
T |
value()
The value resulting from the refresh.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcopypublic static <T> RefreshResult.Builder<T> builder(T value)
RefreshResult.value - The value that should be cached by the supplier.public T value()
public Instant staleTime()
public Instant prefetchTime()
CachedSupplier.prefetchStrategy.public RefreshResult.Builder<T> toBuilder()
ToCopyableBuildertoBuilder in interface ToCopyableBuilder<RefreshResult.Builder<T>,RefreshResult<T>>Copyright © 2022. All rights reserved.