Class SyncTimeoutTask

java.lang.Object
software.amazon.awssdk.core.internal.http.timers.SyncTimeoutTask
All Implemented Interfaces:
Runnable, TimeoutTask

public final class SyncTimeoutTask extends Object implements TimeoutTask
TimeoutTask to be scheduled for synchronous operations.
  • Method Details

    • abortable

      public void abortable(Abortable abortable)
      Specified by:
      abortable in interface TimeoutTask
      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.
      Specified by:
      run in interface Runnable
    • 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:
      cancel in interface TimeoutTask
    • 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:
      hasExecuted in interface TimeoutTask
      Returns:
      True if timeout task has executed. False otherwise