Class ClockSkew
java.lang.Object
software.amazon.awssdk.core.retry.ClockSkew
Utility methods for checking and reacting to the current client-side clock being different from the service-side clock.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DurationgetClockSkew(Instant clientTime, Instant serverTime) Calculate the time skew between a client and server date.getServerTime(SdkHttpResponse serviceResponse) Get the server time from the service response, or empty if the time could not be determined.static booleanisClockSkewed(Instant clientTime, Instant serverTime) Determine whether the request-level client time was sufficiently skewed from the server time as to possibly cause a clock skew error.
-
Method Details
-
isClockSkewed
-
getClockSkew
Calculate the time skew between a client and server date. This value has the same semantics ofHttpClientDependencies.timeOffset(). Positive values imply the client clock is "fast" and negative values imply the client clock is "slow". -
getServerTime
Get the server time from the service response, or empty if the time could not be determined.
-