public class TimeLimitedCodeBlock extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
TimeLimitedCodeBlock.RunnableWithException |
| Constructor and Description |
|---|
TimeLimitedCodeBlock() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
runWithTimeout(long timeout,
TimeUnit timeUnit,
Callable<T> callable) |
static void |
runWithTimeout(long timeout,
TimeUnit timeUnit,
Runnable runnable) |
static void |
runWithTimeout(long timeout,
TimeUnit timeUnit,
TimeLimitedCodeBlock.RunnableWithException runnable) |
public static void runWithTimeout(long timeout,
TimeUnit timeUnit,
Runnable runnable)
throws Exception
Exceptionpublic static void runWithTimeout(long timeout,
TimeUnit timeUnit,
TimeLimitedCodeBlock.RunnableWithException runnable)
throws Exception
ExceptionCopyright © 2019–2020. All rights reserved.