Class SyncTimeoutTask
java.lang.Object
software.amazon.awssdk.core.internal.http.timers.SyncTimeoutTask
- All Implemented Interfaces:
Runnable,TimeoutTask
TimeoutTask to be scheduled for synchronous operations.-
Method Details
-
abortable
- Specified by:
abortablein interfaceTimeoutTask- Parameters:
abortable- the abortable request
-
run
public void run()Runs this task. If cancel() was called prior to this invocation, has no side effects. Otherwise, behaves with the following post-conditions: (1) threadToInterrupt's interrupt flag is set to true (unless a concurrent process clears it); (2) hasExecuted() will return true. Note that run(), cancel(), and hasExecuted() behave atomically - calls to these methods operate with strict happens-before relationships to one another. -
cancel
public void cancel()Cancels this task. Once this returns, it's guaranteed that hasExecuted() will not change its value, and that this task won't interrupt the threadToInterrupt this task was created with.- Specified by:
cancelin interfaceTimeoutTask
-
hasExecuted
public boolean hasExecuted()Returns whether this task has finished executing its timeout behavior. The interrupt flag set by this task will only be set if hasExecuted() returns true, and is guaranteed not to be set at the time hasExecuted() returns false.- Specified by:
hasExecutedin interfaceTimeoutTask- Returns:
- True if timeout task has executed. False otherwise
-