public final class TimeoutTimer extends Object implements TimeoutExecutor
| 限定符和类型 | 字段和说明 |
|---|---|
static org.slf4j.Logger |
LOG |
MAXIMUM_POOL_SIZE| 限定符和类型 | 方法和说明 |
|---|---|
static TimeoutTimer |
getInstance() |
int |
getTaskCount() |
<THROWABLE extends Throwable> |
onTimeout(TimeDuration timeout,
CheckedRunnable<THROWABLE> task,
Consumer<THROWABLE> errorHandler)
Schedule a timeout task.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonTimeoutpublic static TimeoutTimer getInstance()
getInstance 在接口中 TimeoutExecutorpublic int getTaskCount()
getTaskCount 在接口中 TimeoutExecutorpublic <THROWABLE extends Throwable> void onTimeout(TimeDuration timeout, CheckedRunnable<THROWABLE> task, Consumer<THROWABLE> errorHandler)
TimeoutExecutoronTimeout 在接口中 TimeoutExecutortimeout - the timeout value.task - the task to run when timeout.errorHandler - to handle the error, if there is any.Copyright © 2017–2023 The Apache Software Foundation. All rights reserved.