public class TimeoutThreadPoolBuilder
extends java.lang.Object
ScheduledThreadPoolExecutor
for the request timeout and client
execution timeout featuresConstructor and Description |
---|
TimeoutThreadPoolBuilder() |
Modifier and Type | Method and Description |
---|---|
static java.util.concurrent.ScheduledThreadPoolExecutor |
buildDefaultTimeoutThreadPool() |
private static void |
safeSetRemoveOnCancel(java.util.concurrent.ScheduledThreadPoolExecutor executor)
ScheduledThreadPoolExecutor.setRemoveOnCancelPolicy(boolean) is not available in Java
6 so we invoke it with reflection to be able to compile against Java 6. |
private static void |
throwSetRemoveOnCancelException(java.lang.Throwable cause)
Wrap exception caused by calling setRemoveOnCancel in an Amazon client exception
|
public static java.util.concurrent.ScheduledThreadPoolExecutor buildDefaultTimeoutThreadPool()
private static void safeSetRemoveOnCancel(java.util.concurrent.ScheduledThreadPoolExecutor executor)
ScheduledThreadPoolExecutor.setRemoveOnCancelPolicy(boolean)
is not available in Java
6 so we invoke it with reflection to be able to compile against Java 6.executor
- private static void throwSetRemoveOnCancelException(java.lang.Throwable cause)
cause
- Root cause of exception