Class ClientExecutionTimer

java.lang.Object
com.amazonaws.http.timers.client.ClientExecutionTimer

@ThreadSafe public class ClientExecutionTimer extends Object
Represents a timer to enforce a timeout on the total client execution time. That is the time spent executing request handlers, any HTTP request including retries, unmarshalling, etc. Essentially all the time spent in AmazonHttpClient
  • Constructor Details

    • ClientExecutionTimer

      public ClientExecutionTimer()
  • Method Details

    • startTimer

      public ClientExecutionAbortTrackerTask startTimer(int clientExecutionTimeoutMillis)
      Start the timer with the specified timeout and return a object that can be used to track the state of the timer and cancel it if need be.
      Parameters:
      clientExecutionTimeoutMillis - A positive value here enables the timer, a non-positive value disables it and returns a dummy tracker task
      Returns:
      Implementation of ClientExecutionAbortTrackerTaskImpl to query the state of the task, provide it with up to date context, and cancel it if appropriate
    • getExecutor

      public ScheduledThreadPoolExecutor getExecutor()
      This method is current exposed for testing purposes
      Returns:
      The underlying ScheduledThreadPoolExecutor
    • shutdown

      public void shutdown()
      Shutdown the underlying ScheduledThreadPoolExecutor. Should be invoked when AmazonHttpClient is shutdown