public final class CachedS3ExpressCredentials extends Object implements SdkAutoCloseable
CachedSupplier
to wrap the credential value and provide refresh capabilities, set with the NonBlocking prefetch strategy
in order to get asynchronous refresh with a common thread pool.
Each time the value is requested through the get() method, the class delegates to the cached supplier to get
the value. The cached supplier uses the refreshResult(Function, S3ExpressIdentityKey) function to retrieve the
value.
Stale time - the time before, and relative to, the expiration time that the credentials are considered stale (invalid) Prefetch time - the time before, and relative, the expiration time that the credentials are eligible for refresh
prefetch stale expiration
---------|---------|---|---------------
<-------->
refresh
Make sure to close() instances when they are no longer used.
| Modifier and Type | Class and Description |
|---|---|
static class |
CachedS3ExpressCredentials.Builder |
| Modifier and Type | Method and Description |
|---|---|
static CachedS3ExpressCredentials.Builder |
builder(Function<S3ExpressIdentityKey,SessionCredentials> supplier) |
void |
close() |
boolean |
equals(Object o) |
SessionCredentials |
get() |
int |
hashCode() |
public static CachedS3ExpressCredentials.Builder builder(Function<S3ExpressIdentityKey,SessionCredentials> supplier)
public SessionCredentials get()
public void close()
SdkAutoCloseableclose in interface SdkAutoCloseableclose in interface AutoCloseableCopyright © 2026. All rights reserved.