@ThreadSafe public class ClientExecutionTimer extends Object implements SdkAutoCloseable
AmazonHttpClient| Constructor and Description |
|---|
ClientExecutionTimer() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Shutdown the underlying
ScheduledThreadPoolExecutor. |
ScheduledThreadPoolExecutor |
getExecutor()
This method is current exposed for testing purposes
|
ClientExecutionAbortTrackerTask |
startTimer(long 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.
|
public ClientExecutionAbortTrackerTask startTimer(long clientExecutionTimeoutMillis)
clientExecutionTimeoutMillis - A positive value here enables the timer, a non-positive value disables it and
returns a dummy tracker taskClientExecutionAbortTrackerTaskImpl to query the state of
the task, provide it with up to date context, and cancel it if appropriatepublic ScheduledThreadPoolExecutor getExecutor()
ScheduledThreadPoolExecutorpublic void close()
ScheduledThreadPoolExecutor. Should be invoked when
AmazonHttpClient is shutdownclose in interface AutoCloseableclose in interface SdkAutoCloseableCopyright © 2017 Amazon Web Services, Inc. All Rights Reserved.