Package com.amazonaws.http.timers.client
Class ClientExecutionTimer
java.lang.Object
com.amazonaws.http.timers.client.ClientExecutionTimer
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method is current exposed for testing purposesvoid
shutdown()
Shutdown the underlyingScheduledThreadPoolExecutor
.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.
-
Constructor Details
-
ClientExecutionTimer
public ClientExecutionTimer()
-
-
Method Details
-
startTimer
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
This method is current exposed for testing purposes- Returns:
- The underlying
ScheduledThreadPoolExecutor
-
shutdown
public void shutdown()Shutdown the underlyingScheduledThreadPoolExecutor
. Should be invoked whenAmazonHttpClient
is shutdown
-