public interface TimeoutExecutor
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
MAXIMUM_POOL_SIZE |
| 限定符和类型 | 方法和说明 |
|---|---|
static TimeoutExecutor |
getInstance() |
int |
getTaskCount() |
default void |
onTimeout(TimeDuration timeout,
CheckedRunnable<?> task,
org.slf4j.Logger log,
Supplier<String> errorMessage)
When timeout, run the task.
|
<THROWABLE extends Throwable> |
onTimeout(TimeDuration timeout,
CheckedRunnable<THROWABLE> task,
Consumer<THROWABLE> errorHandler)
Schedule a timeout task.
|
static final int MAXIMUM_POOL_SIZE
static TimeoutExecutor getInstance()
int getTaskCount()
<THROWABLE extends Throwable> void onTimeout(TimeDuration timeout, CheckedRunnable<THROWABLE> task, Consumer<THROWABLE> errorHandler)
timeout - the timeout value.task - the task to run when timeout.errorHandler - to handle the error, if there is any.default void onTimeout(TimeDuration timeout, CheckedRunnable<?> task, org.slf4j.Logger log, Supplier<String> errorMessage)
Copyright © 2017–2023 The Apache Software Foundation. All rights reserved.