Class CachedTokenRefresher<TokenT extends SdkToken>
java.lang.Object
software.amazon.awssdk.awscore.internal.token.CachedTokenRefresher<TokenT>
- All Implemented Interfaces:
- AutoCloseable,- TokenRefresher<TokenT>,- SdkAutoCloseable
@ThreadSafe
@SdkInternalApi
public final class CachedTokenRefresher<TokenT extends SdkToken>
extends Object
implements TokenRefresher<TokenT>
Class to cache Tokens which are supplied by the Suppliers while constructing this class. Automatic refresh can be enabled by
 setting autoRefreshDuration in builder methods.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classCachedTokenRefresher.Builder<TokenT extends SdkToken>
- 
Method SummaryModifier and TypeMethodDescriptionstatic CachedTokenRefresher.Builderbuilder()Builder method to construct instance of CachedTokenRefresher.voidclose()Gets the fresh token from the service or provided suppliers.
- 
Method Details- 
builderBuilder method to construct instance of CachedTokenRefresher.- Returns:
 
- 
refreshIfStaleAndFetchDescription copied from interface:TokenRefresherGets the fresh token from the service or provided suppliers.- Specified by:
- refreshIfStaleAndFetchin interface- TokenRefresher<TokenT extends SdkToken>
- Returns:
- Fresh AwsToken as supplied by suppliers.
 
- 
closepublic void close()Description copied from interface:SdkAutoCloseable- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- SdkAutoCloseable
 
 
-